ClickHouse Client: Autodetect secure connection based on port#74212
Merged
alexey-milovidov merged 2 commits intoJan 6, 2025
Conversation
Contributor
|
This is an automated comment for commit bd367f4 with description of existing statuses. It's updated for the latest CI running ✅ Click here to open a full report in a separate page Successful checks
|
alexey-milovidov
approved these changes
Jan 6, 2025
Member
|
Ok. While it would be better with a test, it is still good to merge. |
5 tasks
Contributor
|
Hi @cwurm @alexey-milovidov — while reviewing this PR I found the following:
Happy to discuss — close anything that's wrong or already addressed. |
Contributor
|
Apologies for the duplicate notification — we had a race condition in our notification system where multiple processes posted simultaneously. The duplicate has been removed and we've added a strict 3-layer dedup guard (DB lock + immediate key + GitHub comment check) to ensure this cannot happen again. |
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.
ClickHouse Client already autodetects port 9440 if
--secureis specified, but the reverse is not true. Anecdotally, I see users missing--secureevery once in a while and not being able to connect because of it. The error message when that happens isn't very helpful either:Poco::Exception. Code: 1000, e.code() = 22, Invalid argument (version 24.11.1.2557 (official build)).This change implements autodetecting
--secureif the port is 9440 (the default secure port). The command-line options--secureand--no-securestill take precedence.I've also adjusted some of the docs not to specify both
--secureand--port 9440. I chose to keep the port because I think users will generally expect to specify it when connecting to a database - but I don't have a strong opinion, and we could also keep--secure.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Autodetect secure connection based on connecting to port 9440 in ClickHouse Client.