-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Remove mysql-connector-python #30487
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
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.
Wait.
In https://lists.apache.org/thread/j98bgw9jo7xr4fvjh27d6bfoyxr1omcm we agreed to exclude providers that block us. We did not agree to remove capabilities completely.
There are users who use this functionality and possibly users of Mysql that dont care about Google provider.
It's one thing to hold releases for MySql it's another thing to remove capabilities all together.
Mysql provider changes are not that frequent. Why can't we suspend the provider and see if the proto dependency is resolved given more time? I don't think we are in the step where we need to choose between dropping capabilities vs adding new feature to the provider.
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.
Agree with @eladkal - this is far too much. We should either suspend the provider or (better) turn mysql-connector-python into optional feature.
Thank you all, I misunderstood the point. I will leave the code that uses My suggestion is removing the |
You can add optional dependencies (like mysql-connector-python in this case) via provider.yaml. We already have several examples of it. For example google provider has extra "[leveldb]" which brings in https://github.com/apache/airflow/blob/main/airflow/providers/google/provider.yaml#L1121 And you should move mysql-connector-python there from main dependencies - following the same pattern. There are a few more changes that will need to be added:
That should remove mysql-connector-python from installed dependencies and turn it's usage into, effectively optional feature. |
49a7298
to
d02a7e1
Compare
Thanks for the explanation. I updated the PR, please re-review. |
32f5943
to
de3ce87
Compare
This looks cool and has the desired effect, mysql-connector-python is removed from the image: https://github.com/apache/airflow/actions/runs/4636423980/jobs/8204304593?pr=30487#step:5:18767
However the side-effect is that some new warnings are generated while importing requests (See the failing testts - it contains explanation what to do to mark the warnings as "known" - those do not seem as harmful ones. |
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.
LGTM. Pending fixing the new warnings generated during import.
cdd0703
to
3884cb0
Compare
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.
Nice! @eladkal ?
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.
This is a breaking change for mysql provider. We should update provider yaml version + add entry in change log explaining to users who relay on this lib how they should migrate (install the extra)
Also please update PR title + description so users won't get the wrong impression |
I am not 100% sure if it is breaking to be honest. We already agreed that dependency changes are non-breaking and assuming somoene already has installed mysql-connector-python, it will continue to work after the upgrade. Breaking means - if somoene upgrades the provider, things will break. Which is not necessarily true - if someone upgrade from past provider, things will continue to work (because the user will have mysql-connector-python already installed). The user might be prevented from installing the newer provider (because of protobuf for example) but this also does not mean that it's a "breaking change". I think, technically speaking, it's not "strongly" breaking - the usual "breaking" pattern when things break when you upgrade does not "technically" apply. There are other scenarios where things might break - for example when you upgrade airflow image and you expect mysql operators to continue to work. But also technically it is not breaking, because images are "convenience" binaries, and while people might use them in charts, they are not even versioned with breakin/non-breaking (because they contain combination of airflow + possibly breaking providers). So I am not really sure if we should classify that change as breaking. |
We might still of course "classify" it as breaking (nothing prevents us from doing so, we can announce any release breaking if we think doing so will prevent some common problems from our users). But I personally don't think it is strong enough case to classify it as such. |
I'm ok with not listing it as breaking as long as we have a change log entry that explains what is changed. 2-3 lines in enough |
3884cb0
to
e46e70b
Compare
e46e70b
to
4d51ace
Compare
@potiuk , hi, can we merge it please? |
a6f4c10
to
72fa689
Compare
I saw that for some reasons checks were not running. I rebased to rebuild it. |
72fa689
to
93ac98f
Compare
Rebased once more after merging the #30625 |
Yandex provider brings protobuf dependency down to <4 and we are gearing up to updating it everywhere else. Protobuf3 support ends in Q2 2023 for Python https://protobuf.dev/support/version-support/#python Yandex is the last provider that we do not closely collaborate with on fixing * Gogle provider dependencies are actively upgraded to latest version by Google led team: apache#30067 (some of the libraries are already updated) with target to update all dependencies by mid-May * Apache-Beam has already merged protobuf4 support apache/beam#25874 with the target of releasing it in 2.47.0 mid-May * The mysql-connector-python in MySQL provider is already turned into optional dependency: apache#30487 The only remaining dependency limiting us to protobuf 3 (<3.21) is yandexcloud. We've opened an issue to yandexcloud yandex-cloud/python-sdk#71 3 weeks ago and while there was an initial interest, there is no progress on the issue, therefore - in order to prepare for running all the tests and final migration to protobuf4 we need to suspend Yandex provider - following the suspension process we agreed and got a LAZY CONSENSUS on in the https://lists.apache.org/thread/g8b3k028qhzgw6c3yz4jvmlc67kcr9hj mailing list discussion. The yandex provider can be removed from suspension by a PR reverting this change once yandexcloud dependency removes the protobuf limitation in their release and PR reverting this change (and fixing all tests and static check that will be needed) is the way it can be done.
* Turn the package 'mysql-connector-python' as an optional feature * Update airflow/providers/mysql/provider.yaml * Update airflow/providers/mysql/CHANGELOG.rst --------- Co-authored-by: eladkal <[email protected]>
Yandex provider brings protobuf dependency down to <4 and we are gearing up to updating it everywhere else. Protobuf3 support ends in Q2 2023 for Python https://protobuf.dev/support/version-support/#python Yandex is the last provider that we do not closely collaborate with on fixing * Gogle provider dependencies are actively upgraded to latest version by Google led team: #30067 (some of the libraries are already updated) with target to update all dependencies by mid-May * Apache-Beam has already merged protobuf4 support apache/beam#25874 with the target of releasing it in 2.47.0 mid-May * The mysql-connector-python in MySQL provider is already turned into optional dependency: #30487 The only remaining dependency limiting us to protobuf 3 (<3.21) is yandexcloud. We've opened an issue to yandexcloud yandex-cloud/python-sdk#71 3 weeks ago and while there was an initial interest, there is no progress on the issue, therefore - in order to prepare for running all the tests and final migration to protobuf4 we need to suspend Yandex provider - following the suspension process we agreed and got a LAZY CONSENSUS on in the https://lists.apache.org/thread/g8b3k028qhzgw6c3yz4jvmlc67kcr9hj mailing list discussion. The yandex provider can be removed from suspension by a PR reverting this change once yandexcloud dependency removes the protobuf limitation in their release and PR reverting this change (and fixing all tests and static check that will be needed) is the way it can be done.
FYI. MySQL does not really collaboarate. They released a new version of
I answered appropriately : https://forums.mysql.com/read.php?50,708413,708803#msg-708803 |
FYI I see they actually replied in a more useful manner on this post that they are facing a bug in protobuf with trying to upgrade to protobuf 4: https://forums.mysql.com/read.php?50,708753,708764#msg-708764
We are currently working on upgrading Python Protobuf to 4.x in the upcoming release, but we are facing a blocker. A bug in the latest protobuf version (protocolbuffers/protobuf#12373) is affecting our implementation.
So at least that answer contains information.
|
Let's see. Yes it's interesting that they respond differently to different issues. But - it is not an issue for us any more. It's issue for them after we merged this PR. |
(Disclaimer: I'm the lead developer of Connector/Python) @potiuk I'm sorry very about the late reply on the forum. This indeed is the same issue. |
Cool. Great to know it! @nmariz . Thanks for letting us know - looking forward to getting it fixed :) |
Turn the package
mysql-connector-python
optional to exclude it from dependencies due to conflicts with the newerprotobuf
versions coming with Google SDK upgrade #30067