Fix import errors updating DAGs in other bundles#63615
Merged
gopidesupavan merged 1 commit intoapache:mainfrom Mar 15, 2026
Merged
Fix import errors updating DAGs in other bundles#63615gopidesupavan merged 1 commit intoapache:mainfrom
gopidesupavan merged 1 commit intoapache:mainfrom
Conversation
6b037d6 to
0f5c42a
Compare
potiuk
approved these changes
Mar 15, 2026
ephraimbuddy
approved these changes
Mar 15, 2026
github-actions bot
pushed a commit
that referenced
this pull request
Mar 15, 2026
(cherry picked from commit b93d379) Co-authored-by: GPK <gopidesupavan@gmail.com>
Backport successfully created: v3-1-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
potiuk
pushed a commit
that referenced
this pull request
Mar 15, 2026
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.
Import error updates in dag processing were matching DagModel rows by relative_fileloc only. When two DAG bundles contained files with the same relative path, an import error in one bundle could incorrectly mark the other bundle’s DAG as having import errors and even overwrite its bundle_name.
This is easily reproducible:
files/bundle_a/example_dag.py
files/bundle_b/example_dag.py
Set the bundle config:
export AIRFLOW__DAG_PROCESSOR__DAG_BUNDLE_CONFIG_LIST='[
{"name":"bundle_a","classpath":"airflow.dag_processing.bundles.local.LocalDagBundle","kwargs":{"path":"/files/bundle_a","refresh_interval":0}},
{"name":"bundle_b","classpath":"airflow.dag_processing.bundles.local.LocalDagBundle","kwargs":{"path":"/files/bundle_b","refresh_interval":0}}
]'
Parse both bundles successfully:
Introduce an import error only in files/bundle_a/example_dag.py.
Reparse only bundle_a
airflow dags reserialize --bundle-name bundle_aBefore this fix, you can end up with both records marked as having import errors, even though only the DAG in bundle_a is broken.
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.