Stop airflowctl e2e xcom tests failing on a slow compose stack - #72260
Merged
Conversation
Member
|
looks interesting |
The xcom commands can only run once their Dag run has finished, and the wait that enforces that gave a freshly booted PROD compose stack only 60 seconds. Every sample cost a full airflowctl subprocess, so a slow machine got barely a dozen looks in before the budget ran out. Because all five xcom commands share one Dag run, a single slow boot failed all of them at once, behind a message that said nothing about how far the run had got.
rjgoyln
force-pushed
the
fix/ctl-e2e-dag-run-wait
branch
from
August 30, 2026 07:56
7df992f to
0ee1445
Compare
rjgoyln
marked this pull request as ready for review
August 30, 2026 07:57
rjgoyln
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
henry3260,
jason810496 and
potiuk
as code owners
August 30, 2026 07:57
potiuk
approved these changes
Aug 30, 2026
Contributor
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
github-actions Bot
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Aug 30, 2026
…stack (apache#72260) The xcom commands can only run once their Dag run has finished, and the wait that enforces that gave a freshly booted PROD compose stack only 60 seconds. Every sample cost a full airflowctl subprocess, so a slow machine got barely a dozen looks in before the budget ran out. Because all five xcom commands share one Dag run, a single slow boot failed all of them at once, behind a message that said nothing about how far the run had got. (cherry picked from commit f760ac1) Co-authored-by: rjgoyln <151457491+rjgoyln@users.noreply.github.com>
aws-airflow-bot
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Aug 30, 2026
…stack (apache#72260) The xcom commands can only run once their Dag run has finished, and the wait that enforces that gave a freshly booted PROD compose stack only 60 seconds. Every sample cost a full airflowctl subprocess, so a slow machine got barely a dozen looks in before the budget ran out. Because all five xcom commands share one Dag run, a single slow boot failed all of them at once, behind a message that said nothing about how far the run had got. (cherry picked from commit f760ac1) Co-authored-by: rjgoyln <151457491+rjgoyln@users.noreply.github.com>
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.
Summary
The xcom commands can only run once their Dag run has finished — a task entering RUNNING clears every XCom key under it, wiping what the test just added. The wait that enforces this gave a freshly booted PROD-image compose stack 60 seconds and spent it forking a subprocess per sample, so the budget bought about half the looks it appears to while competing for CPU with the stack it was waiting on. A cold scheduler needing more than a minute to queue and run a bash task is not a failure, but the suite reported it as five: all the xcom commands share one Dag run, and
xcom deletefailed behind the misleading "XCom doesn't exist".Change
Polling moved to the REST API and the budget to 300 seconds, overridable with
AIRFLOW_CTL_TEST_DAG_RUN_TIMEOUT. The longer budget is for a slow stack rather than a broken one, so a rejected request still fails immediately, and a timeout now names the Dag run and task instance states — enough to tell a run the scheduler never picked up from a task still executing. Only the first xcom command spends the budget; the rest skip after one re-check, so a run that finishes late still lets them through.Tests
Each unit test was checked to fail when the behaviour it guards is removed. The wait ran against a live compose stack twice — once healthy, once with the scheduler and worker throttled so the run was still executing when the xcom commands were reached.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines