Repository navigation
Mark DAGModel stale and associate bundle on import errors - #49769
Merged
Merged
Conversation
sunank200
force-pushed
the
mark-stale-with-import-errors
branch
from
April 25, 2025 08:43
40f3a54 to
ef9bbbf
Compare
sunank200
marked this pull request as ready for review
April 25, 2025 08:50
Member
|
Tested locally, also fixes #49617 |
pierrejeambrun
approved these changes
Apr 25, 2025
sunank200
force-pushed
the
mark-stale-with-import-errors
branch
from
April 25, 2025 08:57
ef9bbbf to
9988349
Compare
sunank200
force-pushed
the
mark-stale-with-import-errors
branch
from
April 25, 2025 09:11
64418a9 to
d9e05f3
Compare
1 of 2 tasks
vatsrahul1001
approved these changes
Apr 25, 2025
Contributor
|
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.
sunank200
force-pushed
the
mark-stale-with-import-errors
branch
from
April 27, 2025 20:09
d9e05f3 to
5f5b20f
Compare
kaxil
pushed a commit
that referenced
this pull request
Apr 28, 2025
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> (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 <uranusjr@gmail.com>
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
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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.