Repository navigation
Run leaking provider tests with providers changed after them in CI - #74123
Merged
shahar1 merged 1 commit intoOct 3, 2026
Merged
Conversation
shahar1
requested review from
amoghrajesh,
ashb,
bugraoz93,
choo121600,
ephraimbuddy,
gopidesupavan,
jason810496,
jedcunningham,
jscheffl,
potiuk and
vatsrahul1001
as code owners
October 2, 2026 20:37
ashb
approved these changes
Oct 3, 2026
A PR that only changes a provider runs that provider's tests, with its direct dependents, in a pytest process of its 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 reload airflow.executors.executor_loader and leave its state behind, so a test that mocks ExecutorLoader through the module path can pass in its PR and fail on every canary build and release-candidate check afterwards. PR apache#73832 did exactly that with an edge3 test. Selective checks now add the providers listed in PROVIDERS_WITH_PROCESS_GLOBAL_TEST_SIDE_EFFECTS to the Providers[...] test type whenever a provider whose own files changed sorts after them, so the PR runs those tests in the order canary does. Dependents pulled in only for coverage do not widen the selection, and the CI job description keeps naming the selected providers.
shahar1
force-pushed
the
selective-checks-test-side-effect-providers
branch
from
October 3, 2026 12:27
03fd387 to
d768beb
Compare
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.
related: #73832, #74122
This PR includes
cncf.kubernetestests in selective DB checks for providers that run after it, so checks catch shared-process state leaks like the edge3 canary failure.AI Summary
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(currentlycncf.kubernetes) is added to theProviders[...]test type when a provider whose own files changed sorts after it. A change toproviders/edge3/now runsProviders[cncf.kubernetes,common.compat,edge3]; a change toproviders/apache/beam/or an API change pulling infabstays as before.common.compat,edge3, notcncf.kubernetes,common.compat).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 thecncf.kubernetessuite (about 800 test functions) in the DB jobs and in each compat-matrix entry. A new leak introduced on thecncf.kubernetesside is not caught by this; the durable fix for that is replacing thereload()calls incncf.kubernetesandcelerytests with theclean_executor_loaderfixture, which is a separate cleanup.Evidence: running the full canary shared bucket DB tests from
mainlocally 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) andtest_selective_checks.pyupdated 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?
Generated-by: Claude Code (Fable 5.1) following the guidelines