shahar1 opened a new pull request, #74123: URL: https://github.com/apache/airflow/pull/74123
A PR that only changes a provider runs that provider's tests (plus direct dependents) in a pytest process of their own. On canary the same tests run inside the shared `Providers[-amazon,celery,google,standard]` process, after every provider that sorts before them. `cncf.kubernetes` tests `importlib.reload()` `airflow.executors.executor_loader` and leave its state behind (a replaced `ExecutorLoader` class object and a cached `KubernetesExecutor` name), so a test that mocks `ExecutorLoader` through the module path passes in its own PR and fails on every canary build afterwards. #73832 did exactly that with an edge3 test; #74122 fixes that test. This makes selective checks reproduce the relevant part of the canary process composition: - `PROVIDERS_WITH_PROCESS_GLOBAL_TEST_SIDE_EFFECTS` (currently `cncf.kubernetes`) is added to the `Providers[...]` test type when a provider whose **own files changed** sorts after it. A change to `providers/edge3/` now runs `Providers[cncf.kubernetes,common.compat,edge3]`; a change to `providers/apache/beam/` or an API change pulling in `fab` stays as before. - Dependents pulled in only for coverage do not widen the selection, since a PR can make a provider's tests order-sensitive only by changing that provider. - The CI job description keeps naming the selected providers (`common.compat,edge3`, not `cncf.kubernetes,common.compat`). - Individually-listed test types are untouched, as each provider runs alone there. Scope and cost: this covers DB tests, which run one process per test type in sorted folder order. Non-DB tests share one xdist pool across all test types, so there is no deterministic order to reproduce. 76 of the 104 shared-bucket providers sort after `cncf.kubernetes`, so most single-provider PRs gain the `cncf.kubernetes` suite (about 800 test functions) in the DB jobs and in each compat-matrix entry. A new leak introduced on the `cncf.kubernetes` side is not caught by this; the durable fix for that is replacing the `reload()` calls in `cncf.kubernetes` and `celery` tests with the `clean_executor_loader` fixture, which is a separate cleanup. Evidence: running the full canary shared bucket DB tests from `main` locally in one process (2627 tests) fails exactly one test, the edge3 one. No other provider is currently affected, so the list stays at one entry. Docs (`dev/breeze/doc/ci/04_selective_checks.md`) and `test_selective_checks.py` updated in the same change: 4 existing expectations widen, new parametrized tests cover the rule, the description stripping and the constant's validity. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Fable 5.1) Generated-by: Claude Code (Fable 5.1) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
