Commit Graph

694 Commits

Author SHA1 Message Date
Nikolai Kochetov
1326d9935f Clean data dir and always start an old server version in aggregate functions compatibility test. 2023-09-28 15:28:26 +00:00
robot-clickhouse
66c2ac9364 Automatic style fix 2023-09-16 00:32:32 +00:00
János Benjamin Antal
d975ee7608 Fix argument parsing bug 2023-09-16 00:07:54 +00:00
János Benjamin Antal
16e2f7f0b9 Add optional version argument to rm 2023-09-16 00:03:46 +00:00
Antonio Andelic
6306180333
Merge pull request #53049 from ClickHouse/keeper-batch-flushes
Try batching multiple flush requests in Keeper
2023-09-14 11:39:33 +02:00
pufit
85b23e9403 Increase default timeout in tests for keeper-client 2023-09-12 14:06:57 -04:00
pufit
4f5d132019 Fix timeout keeper-client 2023-09-11 14:46:40 -04:00
Antonio Andelic
1494eb3a86 Fix version parsing 2023-09-11 12:34:16 +00:00
robot-clickhouse
cc78926919 Automatic style fix 2023-09-07 00:44:54 +00:00
pufit
ef2350cfc7 Implementing exists, sync commands. Better tests 2023-09-06 20:36:39 -04:00
Antonio Andelic
365bc584ec Merge branch 'master' into keeper-batch-flushes 2023-09-04 07:24:21 +00:00
Arthur Passos
fd417c84ef resolve might return proxy2 in some cases, account for that 2023-09-01 13:41:12 -03:00
Antonio Andelic
5f1a75ceae Fix tests 2023-09-01 12:13:33 +00:00
robot-clickhouse
3999994eb4 Automatic style fix 2023-08-31 15:07:26 +00:00
Antonio Andelic
7739dd7157 Fix integration tests 2023-08-31 14:52:42 +00:00
Antonio Andelic
4137cb916d Merge branch 'master' into keeper-batch-flushes 2023-08-28 13:14:06 +00:00
Arthur Passos
2bade7db08
Add global proxy setting (#51749)
* initial impl

* fix env ut

* move ut directory

* make sure no null proxy resolver is returned by ProxyConfigurationResolverProvider

* minor adjustment

* add a few tests, still incomplete

* add proxy support for url table function

* use proxy for select from url as well

* remove optional from return type, just returns empty config

* fix style

* style

* black

* ohg boy

* rm in progress file

* god pls don't let me kill anyone

* ...

* add use_aws guards

* remove hard coded s3 proxy resolver

* add concurrency-mt-unsafe

* aa

* black

* add logging back

* revert change

* imrpove code a bit

* helper functions and separate tests

* for some reason, this env test is not working..

* formatting

* :)

* clangtidy

* lint

* revert some stupid things

* small test adjusmtments

* simplify tests

* rename test

* remove extra line

* freaking style change

* simplify a bit

* fix segfault & remove an extra call

* tightly couple proxy provider with context..

* remove useless include

* rename config prefix parameter

* simplify provider a bit

* organize provider a bit

* add a few comments

* comment out proxy env tests

* fix nullptr in unit tests

* make sure old storage proxy config is properly covered without global context instance

* move a few functions from class to anonymous namespace

* fix no fallback for specific storage conf

* change API to accept http method instead of bool

* implement http/https distinction in listresolver, any still not implemented

* implement http/https distinction in remote resolver

* progress on code, improve tests and add url function working test

* use protcol instead of method for http and https

* small fix

* few more adjustments

* fix style

* black

* move enum to proxyconfiguration

* wip

* fix build

* fix ut

* delete atomicroundrobin class

* remove stale include

* add some tests.. need to spend some more time on the design..

* change design a bit

* progress

* use existing context for tests

* rename aux function and fix ut

* ..

* rename test

* try to simplify tests a bit

* simplify tests a bit more

* attempt to fix tests, accept more than one remote resolver

* use proper log id

* try waiting for resolver

* proper wait logic

* black

* empty

* address a few comments

* refactor tests

* remove old tests

* baclk

* use RAII to set/unset env

* black

* clang tidy

* fix env proxy not respecting any

* use log trace

* fix wrong logic in getRemoteREsolver

* fix wrong logic in getRemoteREsolver

* fix test

* remove unwanted code

* remove ClientConfigurationperRequest and auxilary classes

* remove unwanted code

* remove adapter test

* few adjustments and add test for s3 storage conf  with new proxy settings

* black

* use chassert for context

* Add getenv comment
2023-08-24 16:07:26 +03:00
Antonio Andelic
322b53dd62 Merge branch 'master' into keeper-batch-flushes 2023-08-24 09:08:47 +00:00
robot-clickhouse
ee5d7b1d95 Automatic style fix 2023-08-23 08:22:54 +00:00
Antonio Andelic
cceb2b2d57 Disable integration with async replication 2023-08-23 08:12:05 +00:00
Antonio Andelic
59557ddd7c Merge branch 'master' into keeper-batch-flushes 2023-08-23 08:11:43 +00:00
Konstantin Bogdanov
45856df18c
Remove time.sleep(1) 2023-08-23 08:08:01 +02:00
Nikita Taranov
abcf01b809 impl 2023-08-17 23:51:58 +02:00
Antonio Andelic
ef3e0f7b83 Use async replication in tests 2023-08-09 06:25:47 +00:00
Alexander Tokmakov
c7996d5453
increase election timeout in integration tests (#53052) 2023-08-07 14:48:52 +03:00
Nikolai Kochetov
8f5d0c0cd4 Revert "Merge pull request #52514 from azat/tests/fix-test_version_update_after_mutation"
This reverts commit dd491eeae2, reversing
changes made to b225f9c34b.
2023-07-31 13:03:04 +00:00
Sema Checherinda
115a085d0f
Merge branch 'master' into reset-connection-s3 2023-07-28 14:00:14 +04:00
Sema Checherinda
4629ab1df1 add test with broken pipe 2023-07-28 00:24:05 +04:00
Azat Khuzhin
0401dc453e Fix flakiness of test_version_update_after_mutation by enabling force_remove_data_recursively_on_drop
Since there can be some leftovers:

    2023.07.24 07:08:25.238066 [ 140 ] {} <Error> Application: Code: 219. DB::Exception: Cannot drop: filesystem error: in remove: Directory not empty ["/var/lib/clickhouse/data/system/"]. Probably database contain some detached tables or metadata leftovers from Ordinary engine. If you want to remove all data anyway, try to attach database back and drop it again with enabled force_remove_data_recursively_on_drop setting: Exception while trying to convert database system from Ordinary to Atomic. It may be in some intermediate state. You can finish conversion manually by moving the rest tables from system to .tmp_convert.system.9396432095832455195 (using RENAME TABLE) and executing DROP DATABASE system and RENAME DATABASE .tmp_convert.system.9396432095832455195 TO system. (DATABASE_NOT_EMPTY), Stack trace (when copying this message, always include the lines below):

    0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000e68af57 in /usr/bin/clickhouse
    1. ? @ 0x000000000cab443c in /usr/bin/clickhouse
    2. DB::DatabaseOnDisk::drop(std::shared_ptr<DB::Context const>) @ 0x000000001328d617 in /usr/bin/clickhouse
    3. DB::DatabaseCatalog::detachDatabase(std::shared_ptr<DB::Context const>, String const&, bool, bool) @ 0x0000000013524a6c in /usr/bin/clickhouse
    4. DB::InterpreterDropQuery::executeToDatabaseImpl(DB::ASTDropQuery const&, std::shared_ptr<DB::IDatabase>&, std::vector<StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>, std::allocator<StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>>>&) @ 0x0000000013bc05e4 in /usr/bin/clickhouse
    5. DB::InterpreterDropQuery::executeToDatabase(DB::ASTDropQuery const&) @ 0x0000000013bbc6b8 in /usr/bin/clickhouse
    6. DB::InterpreterDropQuery::execute() @ 0x0000000013bbba22 in /usr/bin/clickhouse
    7. ? @ 0x00000000140b13a5 in /usr/bin/clickhouse
    8. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) @ 0x00000000140ad20e in /usr/bin/clickhouse
    9. ? @ 0x00000000140d2ef0 in /usr/bin/clickhouse
    10. DB::maybeConvertSystemDatabase(std::shared_ptr<DB::Context>) @ 0x00000000140d0aaf in /usr/bin/clickhouse
    11. DB::Server::main(std::vector<String, std::allocator<String>> const&) @ 0x000000000e724e55 in /usr/bin/clickhouse
    12. Poco::Util::Application::run() @ 0x0000000017ead086 in /usr/bin/clickhouse
    13. DB::Server::run() @ 0x000000000e714a5d in /usr/bin/clickhouse
    14. Poco::Util::ServerApplication::run(int, char**) @ 0x0000000017ec07b9 in /usr/bin/clickhouse
    15. mainEntryClickHouseServer(int, char**) @ 0x000000000e711a26 in /usr/bin/clickhouse
    16. main @ 0x0000000008cf13cf in /usr/bin/clickhouse
    17. __libc_start_main @ 0x0000000000021b97 in /lib/x86_64-linux-gnu/libc-2.27.so
    18. _start @ 0x00000000080705ae in /usr/bin/clickhouse
     (version 23.7.1.2012)

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-07-24 10:34:50 +02:00
Sema Checherinda
cfed3589b0 fix style 2023-07-24 01:11:26 +03:00
Sema Checherinda
3cc7f137bd add tests with connection reset by peer 2023-07-22 00:45:12 +02:00
Antonio Andelic
59ad2d9acc
Merge branch 'master' into feature/keeper-dyn-reconf 2023-07-21 14:08:26 +02:00
Nikolai Kochetov
e02a7c7382
Merge pull request #52375 from ClickHouse/disable-analyzer-bc-tests
Disable analyzer setting in backward_compatibility integration tests.
2023-07-21 13:39:06 +02:00
Antonio Andelic
10c2d5dade
Merge branch 'master' into feature/keeper-dyn-reconf 2023-07-21 13:24:18 +02:00
Alexander Tokmakov
a39ba00ec3
Merge pull request #52116 from aalexfvk/http_failover
Handle multiple resolved IPs for HTTP/HTTPS session connection
2023-07-20 18:25:45 +03:00
robot-clickhouse
a26de1b370 Automatic style fix 2023-07-20 15:12:55 +00:00
Nikolai Kochetov
ea252e2f61 Disable analyzer setting in backward_compatibility integration tests. 2023-07-20 15:05:07 +00:00
robot-ch-test-poll
21f22c4043
Merge pull request #49698 from kssenii/fix-pg-sync-tables-exception-broken-sync
Fix materialised pg syncTables
2023-07-20 15:38:18 +02:00
Nikolay Degterinsky
209429d0e3
Merge pull request #49664 from ilejn/test_for_basic_auth_registry
Basic auth to fetch Avro schema in Kafka
2023-07-20 10:58:11 +02:00
alesapin
45a7134478
Merge branch 'master' into feature/keeper-dyn-reconf 2023-07-19 14:04:59 +02:00
Ilya Golshtein
c550a532e6 test_for_basic_auth_registry - black formatter happy + some doc 2023-07-19 08:32:45 +00:00
Ilya Golshtein
66581d091a test_for_basic_auth_registry - both tests works, simplifications 2023-07-19 08:32:45 +00:00
Ilya Golshtein
fb3a860d7f test_for_basic_auth_registry - one kafka instance again 2023-07-19 08:32:45 +00:00
Ilya Golshtein
e3523cb1a4 test_for_basic_auth_registry - attempt to have two kafka instances 2023-07-19 08:32:45 +00:00
Ilya Golshtein
8b0fc82834 test_for_basic_auth_registry - mock up 2023-07-19 08:32:44 +00:00
Azat Khuzhin
e9b7a84aa1 Fix network manager for integration tests
Sometimes you may get:

    >           raise subprocess.CalledProcessError(exit_code, cmd)
    E           subprocess.CalledProcessError: Command '['iptables', '--wait', '-D', 'DOCKER-USER', '-p', 'tcp', '-s', '172.16.2.3', '-d', '172.16.2.2', '-j', 'DROP']' returned non-zero exit status 137.

And only sometimes you may get the reason:

    OCI runtime exec failed: exec failed: cannot exec in a stopped container: unknown

So this means that container for iptables does not exists anymore, and
the reason is the timeout. And the fact that container_exit_timeout was
equal to container_expire_timeout and was 120.

From the docker logs:

    time="2023-07-16T15:46:52.513673446Z" level=debug msg="form data: {\"AttachStderr\":false,\"AttachStdin\":false,\"AttachStdout\":false,\"Cmd\":[\"sleep\",\"120\"],\"HostConfig\":{\"AutoRemove\":true,\"NetworkMode\":\"host\"},\"Image\":\"clickhouse/integration-helper:latest\",\"NetworkDisabled\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Tty\":false}"
    time="2023-07-16T15:48:57.611857183Z" level=debug msg="form data: {\"AttachStderr\":false,\"AttachStdin\":false,\"AttachStdout\":false,\"Cmd\":[\"sleep\",\"120\"],\"HostConfig\":{\"AutoRemove\":true,\"NetworkMode\":\"host\"},\"Image\":\"clickhouse/integration-helper:latest\",\"NetworkDisabled\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Tty\":false}"

And then pytest will try to execute the iptables command:

    time="2023-07-16T15:50:57.698705244Z" level=debug msg="starting exec command 860920ab2aa07e8d285050f200ac92423a3cf8ec3fb2f57683541e62cf6bc20e in container 66d6c96671b5e987345290ddd260727d96b99789b512d40f333f6263f42fd2f1"

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-07-18 12:17:26 +02:00
Antonio Andelic
61dc020b4d
Merge branch 'master' into feature/keeper-dyn-reconf 2023-07-17 12:50:17 +02:00
Kseniia Sumarokova
200dfc24b6
Merge branch 'master' into fix-pg-sync-tables-exception-broken-sync 2023-07-17 11:53:42 +02:00
Aleksei Filatov
801d0955ec Add tests 2023-07-15 08:18:35 +03:00
robot-ch-test-poll
93b40c490f
Merge pull request #51945 from arenadata/ADQM-950-B
Implement support of date/time format specifiers in log and error log file names
2023-07-14 18:54:27 +02:00