Repository navigation
Initialize DAG bundles and sync dags in CLI get_dag function - #53699
Merged
Merged
Conversation
kaxil
reviewed
Jul 24, 2025
ephraimbuddy
force-pushed
the
fix-dag-test
branch
3 times, most recently
from
July 24, 2025 15:02
400b362 to
6be9f6a
Compare
ephraimbuddy
commented
Jul 24, 2025
get_dag functionget_dag function
Add bundle.initialize() call before parsing DAGs in CLI commands to ensure bundles are properly initialized, then sync the dags to the DB. This fixes an issue where CLI commands could not parse DAGs because serialized DAGs were required but bundles were not initialized, and dags not synced to the DB, preventing DAG runs from being created. Closes:apache#53682
ephraimbuddy
force-pushed
the
fix-dag-test
branch
from
July 25, 2025 09:27
6be9f6a to
3d286c8
Compare
kaxil
approved these changes
Jul 25, 2025
ephraimbuddy
added a commit
to astronomer/airflow
that referenced
this pull request
Jul 28, 2025
apache#53699)" This reverts commit 7796cdc.
ferruzzi
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Aug 7, 2025
…e#53699) * Initialize DAG bundles and sync dags in CLI `get_dag` function Add bundle.initialize() call before parsing DAGs in CLI commands to ensure bundles are properly initialized, then sync the dags to the DB. This fixes an issue where CLI commands could not parse DAGs because serialized DAGs were required but bundles were not initialized, and dags not synced to the DB, preventing DAG runs from being created. Closes:apache#53682 * fixup! Initialize DAG bundles and sync dags in CLI `get_dag` function * sync bundles outside the loop
fweilun
pushed a commit
to fweilun/airflow
that referenced
this pull request
Aug 11, 2025
…e#53699) * Initialize DAG bundles and sync dags in CLI `get_dag` function Add bundle.initialize() call before parsing DAGs in CLI commands to ensure bundles are properly initialized, then sync the dags to the DB. This fixes an issue where CLI commands could not parse DAGs because serialized DAGs were required but bundles were not initialized, and dags not synced to the DB, preventing DAG runs from being created. Closes:apache#53682 * fixup! Initialize DAG bundles and sync dags in CLI `get_dag` function * sync bundles outside the loop
1 task done
Eason09053360
added a commit
to Eason09053360/airflow
that referenced
this pull request
Sep 21, 2026
Four CLI paths build a DagBag straight from bundle.path without first calling bundle.initialize(). A LocalDagBundle already has its files on disk, so the gap is invisible in local development and in the test suite; a bundle that materialises its files in initialize() - a Git bundle clones the repo there - is still an empty path at that point. dags list and dags list-import-errors then report an empty bundle and no import errors and exit 0, so a CI gate built on them passes while the Dag files are never read. tasks test, dags test and the --dag-regex lookups fall through to the "search every configured bundle" path, which re-fetches and syncs every bundle to the metadata DB and can return a same-named Dag from a bundle other than the requested one. The three call sites that already initialize - dags report, dags reserialize and the fallback loop in get_bagged_dag - show the intended shape; that fallback loop got its call in apache#53699, which fixed only the one occurrence it was reported for.
Eason09053360
added a commit
to Eason09053360/airflow
that referenced
this pull request
Sep 22, 2026
Four CLI paths build a DagBag straight from bundle.path without first calling bundle.initialize(). A LocalDagBundle already has its files on disk, so the gap is invisible in local development and in the test suite; a bundle that materialises its files in initialize() - a Git bundle clones the repo there - is still an empty path at that point. dags list and dags list-import-errors then report an empty bundle and no import errors and exit 0, so a CI gate built on them passes while the Dag files are never read. tasks test, dags test and the --dag-regex lookups fall through to the "search every configured bundle" path, which re-fetches and syncs every bundle to the metadata DB and can return a same-named Dag from a bundle other than the requested one. The three call sites that already initialize - dags report, dags reserialize and the fallback loop in get_bagged_dag - show the intended shape; that fallback loop got its call in apache#53699, which fixed only the one occurrence it was reported for.
Eason09053360
added a commit
to Eason09053360/airflow
that referenced
this pull request
Sep 28, 2026
Four CLI paths build a DagBag straight from bundle.path without first calling bundle.initialize(). A LocalDagBundle already has its files on disk, so the gap is invisible in local development and in the test suite; a bundle that materialises its files in initialize() - a Git bundle clones the repo there - is still an empty path at that point. dags list and dags list-import-errors then report an empty bundle and no import errors and exit 0, so a CI gate built on them passes while the Dag files are never read. tasks test, dags test and the --dag-regex lookups fall through to the "search every configured bundle" path, which re-fetches and syncs every bundle to the metadata DB and can return a same-named Dag from a bundle other than the requested one. The three call sites that already initialize - dags report, dags reserialize and the fallback loop in get_bagged_dag - show the intended shape; that fallback loop got its call in apache#53699, which fixed only the one occurrence it was reported for.
Eason09053360
added a commit
to Eason09053360/airflow
that referenced
this pull request
Oct 7, 2026
Four CLI paths build a DagBag straight from bundle.path without first calling bundle.initialize(). A LocalDagBundle already has its files on disk, so the gap is invisible in local development and in the test suite; a bundle that materialises its files in initialize() - a Git bundle clones the repo there - is still an empty path at that point. dags list and dags list-import-errors then report an empty bundle and no import errors and exit 0, so a CI gate built on them passes while the Dag files are never read. tasks test, dags test and the --dag-regex lookups fall through to the "search every configured bundle" path, which re-fetches and syncs every bundle to the metadata DB and can return a same-named Dag from a bundle other than the requested one. The three call sites that already initialize - dags report, dags reserialize and the fallback loop in get_bagged_dag - show the intended shape; that fallback loop got its call in apache#53699, which fixed only the one occurrence it was reported for.
Eason09053360
added a commit
to Eason09053360/airflow
that referenced
this pull request
Oct 7, 2026
Four CLI paths build a DagBag straight from bundle.path without first calling bundle.initialize(). A LocalDagBundle already has its files on disk, so the gap is invisible in local development and in the test suite; a bundle that materialises its files in initialize() - a Git bundle clones the repo there - is still an empty path at that point. dags list and dags list-import-errors then report an empty bundle and no import errors and exit 0, so a CI gate built on them passes while the Dag files are never read. tasks test, dags test and the --dag-regex lookups fall through to the "search every configured bundle" path, which re-fetches and syncs every bundle to the metadata DB and can return a same-named Dag from a bundle other than the requested one. The three call sites that already initialize - dags report, dags reserialize and the fallback loop in get_bagged_dag - show the intended shape; that fallback loop got its call in apache#53699, which fixed only the one occurrence it was reported for.
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.
Add bundle.initialize() call before parsing DAGs in CLI commands to ensure
bundles are properly initialized. This fixes an issue where CLI commands
could not parse DAGs because serialized DAGs were required but bundles
were not initialized, preventing DAG runs from being created.
Closes:#53682