tests: fix test_dictionaries_all_layouts_separate_sources flakiness#84969
Merged
azat merged 1 commit intoClickHouse:masterfrom Aug 3, 2025
Merged
Conversation
Contributor
The problem is that the certificate file can be rewritten by another
dictionary setup, look at [1]:
First of all server contains fatal errors in logs, and it should be a
starting point:
Traceback (most recent call last):
File "/http_server.py", line 116, in <module>
start_server(
File "/http_server.py", line 90, in start_server
httpd.socket = ssl.wrap_socket(
File "/usr/lib/python3.10/ssl.py", line 1468, in wrap_socket
context.load_cert_chain(certfile, keyfile)
ssl.SSLError: [SSL] PEM lib (_ssl.c:3900)
Next we can look at pytest logs:
2025-08-01 13:26:29.588000 [ 652 ] DEBUG : Command:[docker exec roottestdictionariesalllayoutsseparatesourceshttps-gw2-clickhouse_hs-1 bash -c mkdir -p $(dirname /fake_cert.pem) && echo ... | base64 --decode > /fake_cert.pem] (cluster.py:119, run_and_check)
2025-08-01 13:26:29.857000 [ 652 ] DEBUG : Command:[docker exec roottestdictionariesalllayoutsseparatesourceshttps-gw2-clickhouse_hs-1 bash -c mkdir -p $(dirname /fake_cert.pem) && echo ... | base64 --decode > /fake_cert.pem] (cluster.py:119, run_and_check)
2025-08-01 13:26:29.909000 [ 652 ] DEBUG : run container_id:roottestdictionariesalllayoutsseparatesourceshttps-gw2-clickhouse_hs-1 detach:True nothrow:False cmd: ['bash', '-c', 'python3 /http_server.py --data-path=/table_SourceHTTPS_hashed_.tsv --schema=https --host=clickhouse_hs --port=5556 --cert-path=/fake_cert.pem >> /var/log/clickhouse-server/http_server.py.log 2>&1'] (cluster.py:2170, exec_in_container)
It does multiple copying of fake_cert.pem, but, it is not synced with
reading of this file in http-server.py
So, let's make helpers for copying from/to container atomic.
[1]: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=8420ce5c332f5cad97c804d2be9f8a7ba7366588&name_0=MasterCI&name_1=Integration%20tests%20%28release%2C%206%2F6%29&name_1=Integration%20tests%20%28release%2C%206%2F6%29
89d2c45 to
0a92698
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem is that the certificate file can be rewritten by another dictionary setup, look at 1:
First of all server contains fatal errors in logs, and it should be a starting point:
Next we can look at pytest logs:
It does multiple copying of
fake_cert.pem, but, it is not synced with reading of this file inhttp-server.pySo, let's make helpers for copying from/to container atomic.
Fixes: #81246
Changelog category (leave one):