-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Allow sessionvariables jdbc url param in source-mysql #25859
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
Conversation
Before Merging a Connector Pull RequestWow! What a great pull request you have here! 🎉 To merge this PR, ensure the following has been done/considered for each connector added or updated:
If the checklist is complete, but the CI check is failing,
|
/test connector=connectors/source-mysql
Build PassedTest summary info:
|
/test connector=connectors/source-mysql-strict-encrypt
Build PassedTest summary info:
|
Affected Connector ReportNOTE
|
Connector | Version | Changelog | Publish |
---|---|---|---|
source-alloydb |
2.0.28 |
✅ | ✅ |
source-alloydb-strict-encrypt |
2.0.28 |
🔵 (ignored) |
🔵 (ignored) |
source-bigquery |
0.2.3 |
✅ | ✅ |
source-clickhouse |
0.1.17 |
✅ | ✅ |
source-clickhouse-strict-encrypt |
0.1.17 |
🔵 (ignored) |
🔵 (ignored) |
source-cockroachdb |
0.1.22 |
✅ | ✅ |
source-cockroachdb-strict-encrypt |
0.1.22 |
🔵 (ignored) |
🔵 (ignored) |
source-db2 |
0.1.19 |
✅ | ✅ |
source-db2-strict-encrypt |
0.1.19 |
🔵 (ignored) |
🔵 (ignored) |
source-mssql |
1.0.16 |
✅ | ✅ |
source-mssql-strict-encrypt |
1.0.16 |
🔵 (ignored) |
🔵 (ignored) |
source-mysql |
2.0.22 |
✅ | ❌ (diff seed version) |
source-mysql-strict-encrypt |
2.0.22 |
🔵 (ignored) |
🔵 (ignored) |
source-oracle |
0.3.24 |
✅ | ✅ |
source-oracle-strict-encrypt |
0.3.24 |
🔵 (ignored) |
🔵 (ignored) |
source-postgres |
2.0.29 |
✅ | ✅ |
source-postgres-strict-encrypt |
2.0.29 |
🔵 (ignored) |
🔵 (ignored) |
source-redshift |
0.3.16 |
✅ | ✅ |
source-scaffold-java-jdbc |
0.1.0 |
🔵 (ignored) |
🔵 (ignored) |
source-snowflake |
0.1.34 |
✅ | ✅ |
source-teradata |
0.1.0 |
✅ | ✅ |
source-tidb |
0.2.4 |
✅ | ✅ |
- See "Actionable Items" below for how to resolve warnings and errors.
✅ Destinations (0)
Connector | Version | Changelog | Publish |
---|
- See "Actionable Items" below for how to resolve warnings and errors.
✅ Other Modules (0)
Actionable Items
(click to expand)
Category | Status | Actionable Item |
---|---|---|
Version | ❌ mismatch |
The version of the connector is different from its normal variant. Please bump the version of the connector. |
⚠ doc not found |
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug. |
|
Changelog | ⚠ doc not found |
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug. |
❌ changelog missing |
There is no chnagelog for the current version of the connector. If you are the author of the current version, please add a changelog. | |
Publish | ⚠ not in seed |
The connector is not in the cloud or oss registry, so its publication status cannot be checked. This can be normal (e.g. some connectors are cloud-specific, and only listed in the cloud seed file). Please double-check to make sure that you have added a metadata.yaml file and the expected registries are enabled. |
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 @rodireich
.../connectors/source-mysql/src/main/java/io/airbyte/integrations/source/mysql/MySqlSource.java
Outdated
Show resolved
Hide resolved
...ectors/source-mysql/src/test/java/io/airbyte/integrations/source/mysql/MySqlSourceTests.java
Show resolved
Hide resolved
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.
Quick question : I understand this is mainly to reduce the blast radius of the change. But, is this something that is ONLY specific to mysql and not desired in other connectors?
I guess my thinking is that this seems like generally useful code that will enable all JDBC users to have params in the form of sessionVariables=MAX_EXECUTION_TIME=123456666
What we actually publish can be something else altogether.
I didn't see anything equivalent in postgres jdbc url parameters. |
Out of curiosity, how many people are facing this issue? Longer term, I think we'd not want to expose JDBC param setting. Another option here is to just expose the I think given that this is currently scoped to Mysql, this should be fine - but I really think we should file a ticket to revisit how we're setting JDBC args in the future. For example :
I think this will make some of the existing code confusing. it also seems like the user found a workaround by setting a top-level JDBC param instead of a I'd prefer to shelf this issue for now before we have a good understanding of how often this is used. WDYT? |
This came form one user in #25386. Any of the following variables are valid so there may be other cases - current or future - that can benefit from us supporting it: |
...ectors/source-jdbc/src/main/java/io/airbyte/integrations/source/jdbc/AbstractJdbcSource.java
Outdated
Show resolved
Hide resolved
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.
Small nit, looks good otherwise
/test connector=connectors/source-mysql
Build PassedTest summary info:
|
/test connector=connectors/source-mysql
Build PassedTest summary info:
|
/publish connector=connectors/source-mysql
|
* initial commit * cleanup * cleanup * Throw a configuration exception in case of bad jdbc url param * End-to-End test session variable jdbc param * reafctoring sanity * sanity * bump version and update note * cherry pick fix to unrelated build error * fix failing test --------- Co-authored-by: Ryan Fu <[email protected]>
* initial commit * cleanup * cleanup * Throw a configuration exception in case of bad jdbc url param * End-to-End test session variable jdbc param * reafctoring sanity * sanity * bump version and update note * cherry pick fix to unrelated build error * fix failing test --------- Co-authored-by: Ryan Fu <[email protected]>
What
source mysql can accept a jdbc url param looking like
sessionVariables=MAX_EXECUTION_TIME=123456666
How
Allow adding a sessionVariables param in jdbc url parsing.
In order to reduce blast radius this only applies to mysql and mysql strict encrypt.
This is an adapted code change of #25386