Skip to content

Let Breeze load provider testing Dags separately from example Dags - #70541

Open
ColtenOuO wants to merge 2 commits into
apache:mainfrom
ColtenOuO:split-testing-dags-loading
Open

ColtenOuO wants to merge 2 commits into
apache:mainfrom
ColtenOuO:split-testing-dags-loading

Conversation

@ColtenOuO

@ColtenOuO ColtenOuO commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

This adds a per-provider tests/testing_dags/ folder and a way to load it, without touching airflow-core:

  • breeze shell / breeze start-airflow --load-testing-dags adds every provider's tests/testing_dags/ as a LocalDagBundle through the existing [dag_processor] dag_bundle_config_list, appended to whatever bundles are already configured.
  • load_provider_testing_dags pytest fixture does the same for unit tests, in Breeze and in a local venv.
  • The folder sits under tests/, so it is not shipped in provider distributions.

No Dags move in this PR; that happens one provider at a time in follow-ups.

related: #52475


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5.5)

@ColtenOuO

Copy link
Copy Markdown
Contributor Author

Just a couple more questions before we wrap this up!

  1. The issue only specifies the per-provider testing_dags/ rule, which is what I implemented — but every example Dag that CI currently depends on (example_failed_dag, example_skip_dag, example_passing_params_via_test_command, example_kubernetes_executor) lives in core's own airflow/example_dags/, so should core get a sibling airflow/testing_dags/ as well?

  2. And for the dual-use Dags that stay in example_dags but are "tagged for testing", is tags=["example", "testing"] the intended shape — if so, the check-example-dags-have-example-tag hook from Add prek hook enforcing the "example" tag on example DAGs #67354 will need to be relaxed to allow it.

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMO, I prefer not to touch the prod code at all to fulfill the purpose of #52475. IIUC, how about setting up another "test-only" DagBundle in breeze if the AIRFLOW__CORE__LOAD_TESTING_DAGS ENV flag is set.

cc @jscheffl - the main stakeholder for this one on the direction.

@potiuk potiuk added the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label Jul 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Sep 12, 2026
@jason810496 jason810496 removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Sep 12, 2026

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @ColtenOuO , would you mind to make this PR up to date when you have a moent? Thanks.
Please feel free to mark the PR as ready to review once it is ready, I will mark it as draft for now.

@jason810496
jason810496 marked this pull request as draft September 12, 2026 06:35
@ColtenOuO

Copy link
Copy Markdown
Contributor Author

Hi @ColtenOuO , would you mind to make this PR up to date when you have a moent? Thanks. Please feel free to mark the PR as ready to review once it is ready, I will mark it as draft for now.

Sure! I will work on this tomorrow

Example Dags double as fixtures for Airflow's own tests, so users enabling
load_examples also get Dags such as example_failed_dag that exist only to
exercise Airflow, and stale examples cannot be removed without first checking
which tests depend on them.

Giving providers a tests/testing_dags folder keeps those Dags out of the
provider distributions. Breeze and the test suite add them as Dag bundles
through the existing dag_bundle_config_list option, so Airflow itself needs
no new configuration to tell the two kinds apart.
@ColtenOuO
ColtenOuO force-pushed the split-testing-dags-loading branch from 0355524 to 94cfb0e Compare October 31, 2026 12:57
@ColtenOuO ColtenOuO changed the title Allow providers to ship testing Dags separately from example Dags Let Breeze load provider testing Dags separately from example Dags Oct 31, 2026
@ColtenOuO

Copy link
Copy Markdown
Contributor Author

I reworked the PR so it no longer touches airflow-core:

  • Testing Dags live in providers/<id>/tests/testing_dags/, so they are not shipped in provider distributions.
  • breeze shell / breeze start-airflow --load-testing-dags and the load_provider_testing_dags fixture append each such folder as a LocalDagBundle to the existing [dag_processor] dag_bundle_config_list.

@ColtenOuO
ColtenOuO marked this pull request as ready for review October 31, 2026 13:12

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the update, LGTM overall.

Comment thread scripts/docker/entrypoint_ci.sh Resolved

This branch has not been deployed

No deployments
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.

4 participants