Skip to content

Conversation

@ephraimbuddy
Copy link
Contributor

@ephraimbuddy ephraimbuddy commented Sep 1, 2025

DagBag is not a DB model, it’s the parser/collector used by the dag processor. This change moves it to a more natural home under airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
and helps avoid import tangles.

What changed:

New module: airflow.dag_processing.dagbag now hosts: DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds getattr shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence in one place.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:CLI area:DAG-processing area:dev-tools area:Scheduler including HA (high availability) scheduler area:serialization area:task-sdk backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch labels Sep 1, 2025
@ephraimbuddy ephraimbuddy force-pushed the move-dagbag-to-dag-processing branch from a690dbb to 4689218 Compare September 1, 2025 12:21
@ephraimbuddy ephraimbuddy removed the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Sep 1, 2025
@ephraimbuddy ephraimbuddy added this to the Airflow 3.1.0 milestone Sep 1, 2025
Copy link
Member

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me.

@ephraimbuddy ephraimbuddy force-pushed the move-dagbag-to-dag-processing branch 2 times, most recently from fcb54e6 to 7e723c1 Compare September 2, 2025 07:25
Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change makes sense to me

@ephraimbuddy ephraimbuddy force-pushed the move-dagbag-to-dag-processing branch 2 times, most recently from 99391eb to 8486677 Compare September 2, 2025 12:44
@ephraimbuddy ephraimbuddy force-pushed the move-dagbag-to-dag-processing branch from 0fab14c to 4ffaa8d Compare September 3, 2025 08:24
@ephraimbuddy ephraimbuddy force-pushed the move-dagbag-to-dag-processing branch from 16f35bf to 9cba1e9 Compare September 24, 2025 08:55
@ephraimbuddy ephraimbuddy merged commit 12b8e4c into apache:main Sep 24, 2025
109 checks passed
@ephraimbuddy ephraimbuddy deleted the move-dagbag-to-dag-processing branch September 24, 2025 12:09
@o-nikolas
Copy link
Contributor

I'm just running into this PR now since it causes merge conflicts with one of mine. Should we not move the test module airflow-core/tests/unit/models/test_dagbag.py to airflow-core/tests/unit/dag_processing/test_dagbag.py? @ephraimbuddy @jedcunningham ?

@jedcunningham
Copy link
Member

Yep, it should, good call.

abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Sep 30, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 1, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 2, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 3, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 4, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 7, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 8, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 9, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 10, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 11, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 12, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 14, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 15, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 17, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 19, 2025
* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Move DagBag to airflow/dag_processing

DagBag is not a DB model, it’s the parser/collector used by the
dag processor. This change moves it to a more natural home under
airflow/dag_processing, reduces confusion between “DBDagBag” and "DagBag",
 and helps avoid import tangles.

What changed:
New module: airflow.dag_processing.dagbag now hosts:
DagBag, _capture_with_reraise, FileLoadStat, timeout, sync_bag_to_db

Old location airflow.models.dagbag:
Trimmed to DB-facing helpers (DBDagBag, etc.)

Adds __getattr__ shim for backward compatibility.

Updated imports across the codebase

Pre-commit path allowlist updated to include the new file and remove
the old path.

Deprecation & migration

Deprecated: from airflow.models.dagbag import DagBag

Use instead: from airflow.dag_processing.dagbag import DagBag

A deprecation warning is emitted via the shim; no functional behavior
change intended.

Notes

No runtime logic changes to parsing or DAG discovery.

Tests and CLI code updated to the new import path.

sync_bag_to_db moved alongside DagBag to keep parsing + persistence
in one place.

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Move DagBag to airflow/dag_processing

* Remove get_dagbag method from DagBundlesManager

* Fix dagbag mock

* import DagBag from models instead of models.dagbag in providers

* fixup! import DagBag from models instead of models.dagbag in providers

* fix fab www-hash

* fixup! fix fab www-hash

* leave DagBag import to be from airflow.models.dagbag in init so it issues deprecation warning

* Use DBDagBag in fab type checking if in AF3.1+

* fix static checks

* Update fab hash

* fixup! Update fab hash

* fixup! fixup! Update fab hash

* fixup! fixup! fixup! Update fab hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants