Commit Graph

5428 Commits

Author SHA1 Message Date
SmitaRKulkarni
16dd6ca02f
Merge branch 'master' into 40951_Allow_macro_substitution_in_endpoint 2023-01-02 20:34:24 +01:00
Antonio Andelic
509fd873ec
Try restarting zookeeper if connection failed (#44834) 2023-01-02 16:24:57 +01:00
Kruglov Pavel
966f57ef68
Merge pull request #42777 from Avogar/improve-streaming-engines
Refactor and Improve streaming engines Kafka/RabbitMQ/NATS and data formats
2023-01-02 15:59:06 +01:00
Alexey Milovidov
17e792ca0b
Merge pull request #44825 from azat/ci/integration-fixes
Fix misleading integration tests reports for parametrized tests
2023-01-02 17:49:57 +03:00
Smita Kulkarni
5592d30798 Updated to skip access check for hdfs , as done for other tests - Allow macro substitution in endpoint 2023-01-02 14:03:51 +01:00
Azat Khuzhin
c3b3ae886f tests/integration: ignore exit code for a running group
tee is useful there, otherwise logs are empty on CI

This reverts commit 92fd7def39.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-02 12:08:44 +01:00
Azat Khuzhin
f2c069b852 tests/integration: allow to split parametrized tests between parallel groups
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-02 12:06:56 +01:00
Smita Kulkarni
2f73bf48b8 Added config to integration test test_endpoint_macro_substitution - Allow macro substitution in endpoint 2023-01-02 11:43:19 +01:00
Alexey Milovidov
b89513e789
Merge pull request #44823 from azat/tests/fix-flaky-test_multiple_disks
Fix flaky test_multiple_disks::test_jbod_overflow
2023-01-02 05:25:27 +03:00
Azat Khuzhin
4b71b481c7 tests/integration: do not split paramaterized tests into multiple groups
There is also one assumption the runner already, that leads to
misleading reports like in [1].

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/44762/89c071e291980e355f2c2be42dc15047caabc9bc/integration_tests__asan__%5B4/6%5D.html

Here the test test_multiple_disks/test.py::test_jbod_overflow had been
splitted into multiple groups, however because of that one assumption
it had been runned as a whole in both groups and in one it failed but
succeeded in another.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-01 23:35:21 +01:00
Azat Khuzhin
700943a2b0 tests/integration: remove logging message for undone thing
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-01 23:13:00 +01:00
Azat Khuzhin
fa78569c39 tests/integration: fix logging message
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-01 23:12:25 +01:00
Azat Khuzhin
92fd7def39 tests/integration: fix detecting exit code for a running group
Because of tee the exit code is the result of tee, not of the pytest.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-01 23:09:12 +01:00
Azat Khuzhin
3123761980 Fix flaky test_multiple_disks::test_jbod_overflow
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-01 22:21:24 +01:00
Alexey Milovidov
f5fc9b2825 Fix tests for bridges 2023-01-01 22:00:08 +01:00
alesapin
4948a8c17b
Remove disk restart proxy and disk decorator (#44647)
* Remove disk restart proxy and disk decorator
* Automatic style fix
* Returned some trash back
* Fix build again
* Fix failing test

Co-authored-by: robot-clickhouse <robot-clickhouse@users.noreply.github.com>
2022-12-30 14:47:30 +01:00
SmitaRKulkarni
f9a3aeb172
Merge branch 'master' into 40951_Allow_macro_substitution_in_endpoint 2022-12-30 10:43:14 +01:00
Kruglov Pavel
894726bd8f
Merge branch 'master' into improve-streaming-engines 2022-12-29 22:59:45 +01:00
robot-clickhouse
c09d1bc758 Automatic style fix 2022-12-29 15:16:50 +00:00
Smita Kulkarni
8cc3b2e26c Fixed integration flaky test issue by specifying hdfs client in each test- Allow macro substitution in endpoint 2022-12-29 16:10:06 +01:00
Nikita Mikhaylov
ffaff7167b
Fix flaky tests (#44690) 2022-12-29 14:32:10 +01:00
Alexey Milovidov
9378194320
Merge pull request #44688 from ClickHouse/improve-odbc-test
Improve odbc test
2022-12-29 15:40:47 +03:00
Azat Khuzhin
90b707d130 tests: more fixes for test_keeper_auth
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-12-29 09:29:24 +01:00
Alexey Milovidov
f7b2b961f7
Merge pull request #44667 from azat/tests/integration/dmesg-fix
Move dmesg dumping out from runner to ci-runner.py
2022-12-29 01:56:34 +03:00
Alexey Milovidov
23ea273f73 Edit another test 2022-12-28 19:49:57 +01:00
Alexey Milovidov
edd78da0cb ODBC test: avoid poisoning other tests 2022-12-28 19:45:01 +01:00
Alexey Milovidov
0263499b0c
Merge pull request #44666 from azat/tests/integration/kazoo-stop
tests/integration: add missing kazoo client termination
2022-12-28 21:20:14 +03:00
Azat Khuzhin
03f80bae90 Move dmesg dumping out from runner to ci-runner.py
runner is used by developers to run tests, while ci-runner.py is used
only by CI scripts, and to avoid requiring CAP_SYSLOG for manual dmesg
clear/dump had been moved.

Also for manual runs this can be done manually.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-12-28 15:47:46 +01:00
Vitaly Baranov
8a2fbbe88c
Merge pull request #43947 from azat/backups/dedup
RFC: Add ability to disable deduplication for BACKUP
2022-12-28 15:24:53 +01:00
Alexey Milovidov
1b4121459d
Merge pull request #44645 from ClickHouse/keeper-test-fix
Fix flaky test `test_keeper_multinode_simple`
2022-12-28 16:38:17 +03:00
Azat Khuzhin
bc6adc88c8 tests/integration: add workaround for a bug in kazoo driver
Refs: python-zk/kazoo#688
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-12-28 10:52:49 +01:00
Vitaly Baranov
b211dff013 Increase the create table timeout in test "test_backup_restore_on_cluster". 2022-12-28 00:17:19 +01:00
Nikita Mikhaylov
00ecf6dd05 Better 2022-12-27 17:04:47 +00:00
Nikita Mikhaylov
ce6264b684 Done 2022-12-27 17:03:57 +00:00
Azat Khuzhin
e1ad5cee7e tests/integration: add missing kazoo client termination
pytest play games with logging output [1].

  [1]: https://github.com/pytest-dev/pytest/issues/5502

But this does not actually affect ClickHouse tests, the only reason is
that the kazoo client is not stopped correctly without calling
kazoo.client.KazooClient.stop(), and that's why you can see the
following messages:

<details>

    test_storage_rabbitmq/test.py::test_rabbitmq_big_message --- Logging error ---
    Traceback (most recent call last):
      File "/usr/local/lib/python3.8/dist-packages/kazoo/protocol/connection.py", line 179, in _socket_error_handling
        yield
      File "/usr/local/lib/python3.8/dist-packages/kazoo/protocol/connection.py", line 659, in _connect
        self._socket = self.handler.create_connection(
      File "/usr/local/lib/python3.8/dist-packages/kazoo/handlers/threading.py", line 178, in create_connection
        return utils.create_tcp_connection(socket, *args, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/kazoo/handlers/utils.py", line 265, in create_tcp_connection
        sock = module.create_connection(address, timeout_at)
      File "/usr/lib/python3.8/socket.py", line 808, in create_connection
        raise err
      File "/usr/lib/python3.8/socket.py", line 796, in create_connection
        sock.connect(sa)
    socket.timeout: timed out

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/local/lib/python3.8/dist-packages/kazoo/protocol/connection.py", line 579, in _connect_attempt
        read_timeout, connect_timeout = self._connect(host, hostip, port)
      File "/usr/local/lib/python3.8/dist-packages/kazoo/protocol/connection.py", line 659, in _connect
        self._socket = self.handler.create_connection(
      File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "/usr/local/lib/python3.8/dist-packages/kazoo/protocol/connection.py", line 182, in _socket_error_handling
        raise ConnectionDropped("socket connection error: %s" % (err,))
    kazoo.exceptions.ConnectionDropped: socket connection error: None

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/lib/python3.8/logging/__init__.py", line 1088, in emit
        stream.write(msg + self.terminator)
    ValueError: I/O operation on closed file.
    Call stack:
      File "/usr/lib/python3.8/threading.py", line 890, in _bootstrap
        self._bootstrap_inner()
      File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
        self.run()
      File "/usr/lib/python3.8/threading.py", line 870, in run
        self._target(*self._args, **self._kwargs)
      File "/usr/local/lib/python3.8/dist-packages/kazoo/protocol/connection.py", line 512, in zk_loop
        if retry(self._connect_loop, retry) is STOP_CONNECTING:
      File "/usr/local/lib/python3.8/dist-packages/kazoo/retry.py", line 126, in __call__
        return func(*args, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/kazoo/protocol/connection.py", line 552, in _connect_loop
        status = self._connect_attempt(host, hostip, port, retry)
      File "/usr/local/lib/python3.8/dist-packages/kazoo/protocol/connection.py", line 622, in _connect_attempt
        self.logger.warning('Connection dropped: %s', e)
    Message: 'Connection dropped: %s'
    Arguments: (ConnectionDropped('socket connection error: None'),)

</details>

Which eventually leads to incorrectly parsed report.

This patch is an addition to the `logging.raiseExceptions=False` - #44618

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-12-27 17:01:06 +01:00
Kruglov Pavel
c3405be272
Increase the number of attempts in tests 2022-12-27 16:49:32 +01:00
Azat Khuzhin
c9c590071d Add ability to disable deduplication for BACKUP
Right now BACKUP omit similar files, and will not allow to use this
backup as a regular table, and usually those similar files are quite
small (i.e. columns.txt).

So by using `BACKUP TO S3() deduplicate_files=0` you will be possible to
use `ATTACH TABLE` directly from S3.

P.S. right now it is possible only for the table with one part, since,
usually, there is nothing to deduplicate (if the columns are different).

v2: Add deduplicate_files into metadata
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-12-27 15:56:06 +01:00
Alexey Milovidov
7e447592b1
Merge pull request #44618 from azat/tests/integration/pytest-logging-fix
tests/integration: suppress exceptions during logging (due to pytest)
2022-12-27 14:33:37 +03:00
Alexey Milovidov
79d43c836a
Merge pull request #44572 from ClickHouse/fix-hdfs-test
Fix HDFS test
2022-12-27 14:31:00 +03:00
Alexey Milovidov
41fc65b47b
Merge pull request #44573 from ClickHouse/fix-distributed-queries-stress
Fix test_distributed_queries_stress
2022-12-27 14:30:28 +03:00
Azat Khuzhin
8b2ed0e3cd tests/integration: disable logging.raiseExceptions
Due to pytest play games with logging [1] it is better to ignore it.

  [1]: https://github.com/pytest-dev/pytest/issues/5502

This is due to incorrect kazoo client usage (not all clients calls
stop())

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-12-26 22:57:54 +01:00
Alexey Milovidov
a92a9b4d55
Merge pull request #44535 from azat/tests/integration-dmesg
tests: capture dmesg in integration tests
2022-12-26 23:49:02 +03:00
Alexey Milovidov
a06c8268ea Remove the offender 2022-12-26 11:28:26 +01:00
Alexey Milovidov
f9f0f9446d Fix distributed_queries_stress 2022-12-25 09:46:51 +01:00
robot-clickhouse
19f05d4fb4 Automatic style fix 2022-12-25 08:38:02 +00:00
Alexey Milovidov
cbf140633b Fix HDFS test 2022-12-25 09:30:20 +01:00
Smita Kulkarni
84362461fb Updated test to use macro substitution for hdfs disk - Allow macro substitution in endpoint 2022-12-23 16:07:56 +01:00
Azat Khuzhin
69fadd2193 tests: capture dmesg in integration tests
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-12-23 15:50:10 +01:00
Smita Kulkarni
3d62bc2635 Allow macro substitution in endpoint of disks
Implementation:
* Updated to substitute macros in endpoint for all disks (s3, hfs, web).
Testing:
* Added an integration test test/integration/test_endpoint_macro_substitution.
2022-12-23 15:09:24 +01:00
Mikhail f. Shiryaev
6d0cd35cd0
Ignore exit code 1 for tar in integration tests 2022-12-23 13:08:59 +01:00