-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Sqlalchemy dependency update #38066
Sqlalchemy dependency update #38066
Conversation
- Adding the executemany_mode support of sqlalchemy==2.0.0
sqlalchemy dependency version update.
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
Lines 136 to 139 in 7213fc5
And we also have a FAB (Flask APP Builder) which also limited by |
@Taragolis Thanks for your checking. So I see two options
Is there another easy way we could follow? |
Generally this is the only way to follow. We need somoene (for example you, but can be anyone) to follow up and close all the issues internally (fix all deprecations etc) and nag (or help as you mentioned) everyone who is a blocker to upgrade, and then update all the dependencies (or wait until somoene else does it). Or just wait until they do - this will happen eventually even without you nagging them. Another option of course is to replace the dependencies with others to do the same when we see no option for them to upgrade quickly. All this is for example what happened when we just added Python 3.12. This one took 5 months till Python 3.12 was released and finally we got it merged yesterday. I think a good start (and this is something you could do if you want to make it more progressing) is to create a separate issue named "Sqlalchemy 3 upgrade" where you will track down and list with
all the things that need to happen - and then link (and mark as duplicate) all the issues that refer to it - including the #38064 That would be a very good way to contribute to make that happen eventually. You are most welcome to do that and take a leadership on nagging others and maybe making PRs to fix thins internally. |
It might be good to change default value for execute many for PG, because seems like it didn't change for a long time, and it only valid in SA 1.3, SA 1.4 look like silently fallback to valid value, in SA 2.0+ it is invalid |
@@ -273,7 +273,7 @@ def configure_orm(disable_connection_pool=False, pool_class=None): | |||
|
|||
DEFAULT_ENGINE_ARGS = { | |||
"postgresql": { | |||
"executemany_mode": "values", | |||
"executemany_mode": "values_only", |
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.
Does 1.4 support values_only
?
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.
Yep, values
even not listed in allowed values in 1.4.
But as I could understand the values
-> values_plus_batch
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.
In that case maybe we don't need to raise the lower version bound, and can make the version range >=1.4.36,<2.1.0
instead?
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.
Ahhh... I miss this change. Yeah we definitely should keep support of SA 1.4 as much as possible, not all providers could work with SA 2.0
But also I'm not sure that we need to add support SA 2.0, because I'm not totally sure that Airflow could work with it properly.
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.
Ahhh... I miss this change. Yeah we definitely should keep support of SA 1.4 as much as possible, not all providers could work with SA 2.0
But also I'm not sure that we need to add support SA 2.0, because I'm not totally sure that Airflow could work with it properly.
Agreed. The FAB library you mentioned earlier is required to update their SA. I'll have a quick look on what is needed to update that dependency.
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.
FAB is being migrated in #38319 to 4.4.1 -but still sqlalchemy is < 1.5 there.
Thanks for your detailed response. I would love to contribute to this project but unfortunately, I'm very busy with another open source project. Special thanks to @Taragolis for taking the lead on this PR. I see the questions are answered by Taragolis, but if there's any more input required from me, please don't hesitate to ask :) |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Already fixed in #38362 |
Updating executemany_mode for supporting sqlalchemy>=2.0.0
Trying to resolve the issue #38064
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.