Skip to content

Keep a Breeze test's --dry-run from leaking into later tests - #75589

Merged
shahar1 merged 1 commit into
apache:mainfrom
potiuk:breeze-tests-reset-shared-options
Oct 25, 2026
Merged

shahar1 merged 1 commit into
apache:mainfrom
potiuk:breeze-tests-reset-shared-options

Conversation

@potiuk

@potiuk potiuk commented Oct 24, 2026

Copy link
Copy Markdown
Member

Breeze's dry-run, verbose and forced-answer options are process-wide. A test that invokes a command with --dry-run (for example test_command_writes_has_alerts_output, which runs fork-ci-reconcile --dry-run) left dry-run on for every later test on the same xdist worker, so run_command returned empty output there. test_detects_merged_commits_the_base_does_not_have[merged-newer-than-base] is the case that expects True, so it failed whenever xdist scheduled it after such a test, as in the scheduled ARM run: https://github.com/apache/airflow/actions/runs/40125774775/job/120966892550

An autouse fixture now restores the three options after every test.

Checked locally: running the dry-run test and then the merge test in one process fails without the fixture and passes with it, and the Breeze test suite passes three runs in a row (1743 passed, 7 skipped).


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

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


🤖 Generated with Claude Code

The dry-run, verbose and forced-answer options are process-wide, so a
test invoking a command with --dry-run made run_command return empty
output for every later test on the same xdist worker. Which tests failed
depended on how xdist distributed them, so the Breeze unit tests failed
intermittently, as in the scheduled ARM run.

Generated-by: Claude Opus 5
@shahar1
shahar1 merged commit 0c1fa8e into apache:main Oct 25, 2026
58 checks passed
potiuk added a commit that referenced this pull request Oct 25, 2026
…, #75615) (#75617)

* Keep a Breeze test's --dry-run from leaking into later tests (#75589)

The dry-run, verbose and forced-answer options are process-wide, so a
test invoking a command with --dry-run made run_command return empty
output for every later test on the same xdist worker. Which tests failed
depended on how xdist distributed them, so the Breeze unit tests failed
intermittently, as in the scheduled ARM run.

Generated-by: Claude Opus 5

(cherry picked from commit 0c1fa8e)

* Run shared distribution tests in a single CI job (#74566)

* Run shared distribution tests in a single CI job

The shared distributions matrix starts one runner per directory in
shared/ (14 today) on every PR. Each leg spends ~15s on checkout and uv
setup to run ~2-4s of tests, and the fan-out takes 14 of the 20
concurrent jobs ASF allows per workflow.

Running the distributions sequentially in one job keeps the same
coverage, reports every failing distribution, and frees those slots.

* Run each shared distribution with uv --exact for isolation

* Wrap the shared distributions test loop line to satisfy yamllint

Generated-by: Claude Opus 5

---------

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

(cherry picked from commit 6b42e65)

* Run maintainer and canary CI on self-hosted RunsOn runners (#74889)

This PR implements AIP-118 for integrating self-hosted runners in Apache Airflow's CI, utilizing the project's AWS instance and runs-on.com's runners.

(cherry picked from commit b5bc253)
Generated-by: Claude Opus 5

* Check newsfragment PR numbers in static checks instead of a separate workflow (#75612)

* Check newsfragment PR numbers in static checks instead of a separate workflow

The separate workflow ran outside the fork CI gate (AIP-120), needed its own
required check, and needed its own approval for first-time contributors.
As part of the existing newsfragment hook it runs wherever static checks
run, in project CI and in a contributor's fork, and fails CI passed like any
other static check.

A newsfragment is usually written before its pull request exists, so a
local run cannot know the right number and accepts any.

Generated-by: Claude Opus 5

* Address review of the newsfragment PR number check

A pull request inside a fork carries the fork's number, so only apache/airflow pull requests are checked. A GitHub API error is reported without a traceback, and the instructions say who re-runs the checks when CI runs in the contributor's fork.

Generated-by: Claude Opus 5

(cherry picked from commit 757898c)

The documentation conflicts were resolved by keeping the release branch's text and
updating only its sentences about the newsfragment check.

* Report EC2 Spot interruptions on pull requests and keep them out of Slack (#75615)

Jobs on the self-hosted RunsOn runners fail with exit code 137 when AWS
reclaims their Spot instance. Nothing in the job's log says why, so the
failure looks like a broken test or an out-of-memory kill, although RunsOn
re-runs the job by itself once the run finishes.

A pull request should say so as soon as it happens, and the canary should
not page anyone on Slack until RunsOn has given up retrying. The Slack
notification also never reported how RunsOn's re-run ended, because it only
ran for the first attempt.

Generated-by: Claude Opus 5

(cherry picked from commit 4386cb1)
@potiuk potiuk added this to the Airflow 3.4.0 milestone Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants