Skip to content
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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflow/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Member

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?

Copy link
Contributor

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

sqlalchemy/sqlalchemy#5401

Copy link
Member

@uranusjr uranusjr Mar 13, 2024

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?

Copy link
Contributor

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.

Copy link
Author

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.

Copy link
Member

@potiuk potiuk Mar 20, 2024

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.

"executemany_values_page_size": 10000,
"executemany_batch_page_size": 2000,
},
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ dependencies = [
# See https://sqlalche.me/e/b8d9 for details of deprecated features
# you can set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings.
# The issue tracking it is https://github.com/apache/airflow/issues/28723
"sqlalchemy>=1.4.36,<2.0",
"sqlalchemy>=2.0.0,<2.1.0",
"sqlalchemy-jsonfield>=1.0",
"tabulate>=0.7.5",
"tenacity>=6.2.0,!=8.2.0",
Expand Down
Loading