Skip to content

Stop airflowctl e2e xcom tests failing on a slow compose stack - #72260

Merged
potiuk merged 1 commit into
apache:mainfrom
rjgoyln:fix/ctl-e2e-dag-run-wait
Aug 30, 2026
Merged

Stop airflowctl e2e xcom tests failing on a slow compose stack#72260
potiuk merged 1 commit into
apache:mainfrom
rjgoyln:fix/ctl-e2e-dag-run-wait

Conversation

@rjgoyln

@rjgoyln rjgoyln commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

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 delete failed 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?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

@potiuk

potiuk commented Aug 30, 2026

Copy link
Copy Markdown
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
rjgoyln force-pushed the fix/ctl-e2e-dag-run-wait branch from 7df992f to 0ee1445 Compare August 30, 2026 07:56
@rjgoyln
rjgoyln marked this pull request as ready for review August 30, 2026 07:57
@potiuk
potiuk merged commit f760ac1 into apache:main Aug 30, 2026
140 of 147 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants