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

Remove some top-level imports to airflow.sdk from Core airflow. #47785

Merged

Conversation

ashb
Copy link
Member

@ashb ashb commented Mar 14, 2025

This removes anything from the import path in the Execution API, which was
failing to load when building the sdk's datamodels/_generated.py.

It would be nice to add a ruff rule to enforce this, but while airflow/ is
still in the top level (and not in a subproject) it's a lot of work to do this
without needint go exclude it from every providers rules.

So I'm doing this right now with the knowledge that this is a game of
whack-a-mole.


^ 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.

@ashb ashb requested a review from XD-DENG as a code owner March 14, 2025 13:57
@ashb ashb requested review from uranusjr and kaxil March 14, 2025 13:57
This removes anything from the import path in the Execution API, which was
failing to load when building the sdk's datamodels/_generated.py.

It would be nice to add a ruff rule to enforce this, but while `airflow/` is
still in the top level (and not in a subproject) it's a lot of work to do this
without needint go exclude it from _every_ providers rules.

So I'm doing this right now with the knowledge that this is a game of
whack-a-mole.
@ashb ashb force-pushed the remove-top-level-sdk-imports-from-core branch from 9bc593f to 58bffb2 Compare March 14, 2025 14:36
@jedcunningham jedcunningham merged commit d75c631 into apache:main Mar 14, 2025
44 checks passed
@jedcunningham jedcunningham deleted the remove-top-level-sdk-imports-from-core branch March 14, 2025 20:56
@potiuk
Copy link
Member

potiuk commented Mar 16, 2025

It will be heck easier after #47798

agupta01 pushed a commit to agupta01/airflow that referenced this pull request Mar 21, 2025
…he#47785)

This removes anything from the import path in the Execution API, which was
failing to load when building the sdk's datamodels/_generated.py.

It would be nice to add a ruff rule to enforce this, but while `airflow/` is
still in the top level (and not in a subproject) it's a lot of work to do this
without needint go exclude it from _every_ providers rules.

So I'm doing this right now with the knowledge that this is a game of
whack-a-mole.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants