-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Migrate remaining providers to common.compat compatibility layer in celery #57067
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
bugraoz93
left a comment
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.
Looks good overall! Could you please check the CI, the static checks failing. The Airflow CTL integration tests are fixed in main, rebase should fix that
OK! thanks for your feedback! |
392ebb8 to
615a003
Compare
providers/celery/pyproject.toml
Outdated
| "common.compat" = [ | ||
| "apache-airflow-providers-common-compat>=1.7.4", # + TODO: bump to next version | ||
| ] |
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.
Why as optional 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.
You're right , my mistake.
providers/celery/pyproject.toml
Outdated
| "common.compat" = [ | ||
| "apache-airflow-providers-common-compat>=1.7.4", # + TODO: bump to next version | ||
| ] |
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 has to go to "dependencies"?
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.
@amoghrajesh Yes! You're right. Thanks for your feedback!
|
Static check failure |
OK! I'll try to resolve it. But actually I don't why that test failed. |
Added a TODO comment to indicate the need to bump the version of 'apache-airflow-providers-common-compat'.
- Move 'from airflow.providers.common.compat.sdk import timeout' to top of file - Fixes E402 Module level import not at top of file error
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
05304a2 to
5a3298f
Compare
Replace version-specific conditional imports with common.compat layer. This standardizes compatibility handling across Airflow 2.x and 3.x.
This PR is a part of 57018 about provider celery.
^ 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.