-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Mark DAGModel stale and associate bundle on import errors #49769
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
Merged
uranusjr
merged 3 commits into
apache:main
from
astronomer:mark-stale-with-import-errors
Apr 28, 2025
Merged
Mark DAGModel stale and associate bundle on import errors #49769
uranusjr
merged 3 commits into
apache:main
from
astronomer:mark-stale-with-import-errors
Apr 28, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40f3a54
to
ef9bbbf
Compare
Tested locally, also fixes #49617 |
pierrejeambrun
approved these changes
Apr 25, 2025
ef9bbbf
to
9988349
Compare
64418a9
to
d9e05f3
Compare
2 tasks
vatsrahul1001
approved these changes
Apr 25, 2025
Verified this works |
When a file parse encounters an import error, update the corresponding DagModel (filtered by fileloc) to set has_import_errors, bundle_name, and is_stale in one go. This restores intended behavior where DAGs with import errors are deactivated and flagged immediately. Closes apache#49618.
d9e05f3
to
5f5b20f
Compare
kaxil
pushed a commit
that referenced
this pull request
Apr 28, 2025
Co-authored-by: Tzu-ping Chung <[email protected]> (cherry picked from commit 7b0b7ee)
jroachgolf84
pushed a commit
to jroachgolf84/airflow
that referenced
this pull request
Apr 30, 2025
Co-authored-by: Tzu-ping Chung <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a file parse encounters an import error, update the corresponding DagModel (filtered by file loc) to set has_import_errors, bundle_name, and is_stale in one go. This restores the intended behaviour, where DAGs with import errors are deactivated and flagged immediately.
I have tested this locally by adding import errors to DAG file. It marked it as stale and DAG was not shown in the list. Once import errors were resolved DAG was visible again.
Closes #49618
Closes: #49617
^ 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 airflow-core/newsfragments.