Don't try to authenticate twice when using ssh#93547
Don't try to authenticate twice when using ssh#93547alexey-milovidov merged 11 commits intoClickHouse:masterfrom
Conversation
|
Thanks! Could you please sign a CLA by the link above? Also, we need a test - it's possible to do with the |
|
I have already signed under a corporate contributor license agreement. |
|
Workflow [PR], commit [6136678] Summary: ❌
|
| 0lgWuG96Yy/MxT62bvAAAAE2lzYWtlbEBwYzY0MTAxLTI1MzYBAgMEBQYH | ||
| -----END OPENSSH PRIVATE KEY-----' > id_rsa_03780_failed_ssh" | ||
|
|
||
| spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CURL -sS \$CLICKHOUSE_URL -d 'CREATE USER IF NOT EXISTS user_03780_failed_ssh'" |
There was a problem hiding this comment.
"Flaky check" runs the same test many times and in parallel with itself. To make it succeed, let's use the unique name of the user.
There was a problem hiding this comment.
Do you mean a new unique name for each test? Is there another way to do this than to append a random string?
|
Now it says:
|
| -----END OPENSSH PRIVATE KEY-----' > id_rsa_03780_failed_ssh" | ||
|
|
||
| spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CURL -sS \$CLICKHOUSE_URL -d 'CREATE USER IF NOT EXISTS user_03780_\$CLICKHOUSE_TEST_UNIQUE_NAME'" | ||
|
|
There was a problem hiding this comment.
I think we should wait for completion here.
|
The test didn't pass. |
| IPac9E4ZR36UA2lWK/gr0x8PvxzlonzWqBcYFmCAQv9lPvk1GJK8/EnCkkD5pTvKbHAAAA | ||
| QQDbVchcKjXrhsYklDvJQ4xyGkUH6+xMRVINwzjP3JQ1akUF/MJAYg5vr8j4gibWysVwWV | ||
| 0lgWuG96Yy/MxT62bvAAAAE2lzYWtlbEBwYzY0MTAxLTI1MzYBAgMEBQYH | ||
| -----END OPENSSH PRIVATE KEY-----' > id_rsa_03780_failed_ssh" |
There was a problem hiding this comment.
This file may be overwritten during concurrent runs. Let's make it unique by using the CLICKHOUSE_TMP directory.
The test was failing because: 1. `CLICKHOUSE_TEST_UNIQUE_NAME` doesn't work in `bash -c` context since it's computed from `BASH_SOURCE[1]` which is empty 2. Single quotes in `-d '...'` prevented variable expansion Fixed by using `CLICKHOUSE_DATABASE` (properly inherited env var) and double quotes for the curl `-d` argument. Also made the SSH key filename unique and added cleanup. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
c3fa94a to
6136678
Compare
|
Don't look at the "Bugfix validation (functional tests)" for now - it is broken, CC @maxknv |
|
Now the test runs well in parallel. |
|
Please note that this PR has been reverted as it introduced a flaky test in the CI |
|
@spinojara, please resubmit this change. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix a bug where clickhouse-client would ask for password twice when connecting using ssh.