-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): Update ClickHouse SQL driver to v2 #16423
base: master
Are you sure you want to change the base?
Conversation
f1c28d0
to
f797456
Compare
80069ac
to
d6a09dd
Compare
d6a09dd
to
3c523dd
Compare
5cd941f
to
d2682fd
Compare
a5cd7e3
to
d2682fd
Compare
@AndreKR do current |
No, I don't think so. The main difference is that in v1 |
Do you see some way of converting old DSNs? Maybe DSNs can be converted by parsing them with the v1 parser and (if successful) then create a v2 DSN from it? I'm asking because Telegraf cannot do these kind of breaking changes, therefore we need to find a way to keep the old configs (and thus DSNs) working... |
Yes, I think that would be possible. I'll prepare something. |
58bd017
to
88fce4f
Compare
@srebhan I have added code that converts parameters in the DSN that have been renamed or have a different format to their v2 equivalents. A warning is logged for each legacy parameter. A number of parameters ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @AndreKR for the amazing work! I have some comments in the code...
Additionally, did you test that the conversion function leaves newer v2 DSNs unchanged? Would be good to get some testing there...
Last but not least, please also add a note in the Important Changes
section of the Changelog
about the change, something like
- PR [#16423](https://github.com/influxdata/telegraf/pull/16423) converts the clickhouse drivers to the v2 version.
This new version also requires a [new format for the DSN](url). The plugin tries
its best to convert the old DSN to the new format but might not be able to do so.
Please check for warnings in your log file and convert to the new format as soon
as possible
6aa4837
to
d73a52e
Compare
I had a test about leaving a v2 URL untouched, I have added another one for a v2 URL containing parameters that would be changed if they had incompatible values but they have already compatible values.
Done. |
This updates the clickhouse SQL driver for the SQL output plugin to v2. This keeps some compatibility with v1 DSNs by converting parameters from the v1 to the v2 format while logging a warning. Some parameters are no longer supported, those are removed while logging a warning as well.
d73a52e
to
b787dec
Compare
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @AndreKR for the update and for splitting out the other topics into separate PRs! It's a joy to work with you...
Summary
This updates the clickhouse SQL driver (and its dependencies) to v2.
This is mainly because the v1 driver doesn't support the HTTP protocol, but it also helps with some issues regarding DSN parsing that v1 suffers from.
This includes another commit that changes the default
TableTemplate
so that it works with ClickHouse. Previously everyone who wanted to use ClickHouse had to overrideTableTemplate
.Checklist
Related issues
resolves #16422