Uh oh!
There was an error while loading. Please reload this page.
Allow providers to ship testing Dags separately from example Dags - #70541
Allow providers to ship testing Dags separately from example Dags#70541ColtenOuO wants to merge 1 commit into
Conversation
Example Dags currently serve four different audiences at once: they teach Dag authoring, they back documentation snippets, they verify a deployment, and some of them are load-bearing for CI. Because everything lives in one folder, a user who enables `[core] load_examples` gets Dags that only exist to exercise Airflow itself -- `example_failed_dag`, for instance, is designed to fail -- and nobody can safely delete a stale example without first working out whether a test depends on it. This adds the loading mechanism for a separate `testing_dags` folder per provider so the two purposes can be told apart. No Dags move yet; that happens per provider in follow-ups. Part of apache#52475.
ColtenOuO
commented
Jul 27, 2026
Just a couple more questions before we wrap this up!
|
Summary
Adds the loading mechanism for a per-provider
testing_dags/folder, so Dags thatexist to exercise Airflow itself can be told apart from Dags that teach Dag authoring.
No Dags move in this PR. Moving them happens one provider at a time in follow-ups.
Why
Example Dags currently serve four audiences at once: teaching Dag authoring, backing
documentation snippets, verifying a deployment, and propping up CI. Because they all
share one folder:
[core] load_examplesalso gets Dags that only exist for testing—
example_failed_dagis designed to fail;on it. Today
example_failed_dag,example_skip_dag,example_passing_params_via_test_commandandexample_kubernetes_executorarereferenced from
airflow-core/tests/unit/cli/,airflow-core/tests/unit/api_fastapi/,airflow-e2e-tests/andkubernetes-tests/.What's in here
[core] load_testing_dagsconfig option, defaulting toFalseand independent ofload_examples.DagBundlesManagerdiscovers<provider>/testing_dags/and exposes it as anapache-airflow-providers-*-testing-dagsbundle. The provider-resolution loop added inLoad example DAGs from providers via ProvidersManager (continuation of #57320) #66161 is factored out into
_iter_provider_module_paths()so both folder kinds shareit.
breeze shell/breeze start-airflow --load-testing-dags, plumbed through toAIRFLOW__CORE__LOAD_TESTING_DAGS.load_provider_testing_dagspytest fixture intests_common, so the follow-up PRs canpull these Dags into unit tests from both breeze and a local venv.
contributing-docs/12_provider_distributions.rst.Since no provider ships a
testing_dags/folder yet, this is inert for existingdeployments.
related: #52475
Was generative AI tooling used to co-author this PR?