Skip to content

CI: cancel a superseded pull request run of the fixture and PHPUnit workflows - #724

Merged
rmcdaniel merged 1 commit into
mainfrom
rust-325-ci-cancel-superseded
Oct 24, 2026
Merged

rmcdaniel merged 1 commit into
mainfrom
rust-325-ci-cancel-superseded

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

The org's 20 concurrent GitHub-hosted jobs (Free plan) are the bottleneck for Server CI. One "Shared Server fixtures" run is 13 jobs, about 415 job-minutes, and its longest job takes 82 minutes. When a pull request gets a new push, the run for the replaced head keeps holding runners until someone cancels it by hand. On October 23–24 that happened about eight times.

This adds a concurrency group to:

  • "Shared Server fixtures" (server-parity.yml)
  • "PHPUnit Feature" (phpunit-feature.yml)

A newer push to the same pull request cancels the run in progress, as sonar.yml already does. Runs on main and workflow_dispatch runs are never cancelled.

The group is keyed by event and pull request number. Completed runs, including failed ones, are unaffected, so originals stay preserved. Only an older head's run that is still in progress is cancelled when a newer head arrives.

The Docker workflow isolation policy passes locally.

…orkflows

A newer push to the same pull request now cancels the run in progress for
Shared Server fixtures (13 jobs, about 415 job-minutes) and PHPUnit
Feature, as Sonar already does. The organization's 20 shared runners no
longer spend hours on replaced heads. Runs on main and manual dispatches
always finish.
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Included in train #723, at head 38b826773, so its workflow change is tested once with the train instead of in a separate full fixtures run. Its own run at 31467e575 had passed PHPUnit, repository contracts, the boundary scan, published-sdk-adapters and five codec cells. The one failure, the MariaDB 10.11 codec cell, is the #714 stall on current main, which #717 in the same train removes. Its remaining runs are cancelled; it closes as merged through #723.

rmcdaniel added a commit that referenced this pull request Oct 24, 2026
…perseded PHPUnit runs cancel

The update-validation probe's waiting child requests now retry PHP's
documented backend_lock_pressure refusal (nothing committed) with the same
rule as every other probe request. seconds stays the answered attempt's
own wait; retries are reported on stderr.

PHPUnit feature suite and Feature source qualification used a job-level
always(), which GitHub never cancels, so #724's superseded-run cancellation
left the old run holding the concurrency group. !cancelled() still runs
both jobs when a needed job failed, so the required checks stay fail-closed.
rmcdaniel added a commit that referenced this pull request Oct 24, 2026
…or its PHP leg

The SQLite job's main corpus now excludes update-validation.json. A separate
script records that fixture for php, embedded and rust and compares the three.
Its published PHP record runs with PHP's maintenance loop stopped: under that
loop's SQLite writer contention, PHP 2.11.1 loses its own validation-timeout
and lease-reclaim writes to "database is locked" and its validation poll
answers without the typed lock-pressure refusal (10 of 15 local runs failed
with the loop running, 5 of 5 and 3 of 3 passed with it stopped). Expected
results are unchanged. MySQL and PostgreSQL keep the fixture in their main
corpus with their loops running.

The runner gains --exclude-fixture, which must name a selected fixture and
cannot be combined with --fixture. The maintenance window helper is #722's,
moved to a shared path. Tests cover the selection rules, the workflow wiring
and every restore path of the helper.

PHPUnit Feature returns to main's job conditions and drops its concurrency
group. The central action policy requires always() on the PHPUnit feature
suite gate, and GitHub never cancels an always() job, so cancel-in-progress
would only queue a newer run behind it. Shared Server fixtures keeps #724's
cancellation.
rmcdaniel added a commit that referenced this pull request Oct 24, 2026
…perseded PHPUnit runs cancel

The update-validation probe's waiting child requests now retry PHP's
documented backend_lock_pressure refusal (nothing committed) with the same
rule as every other probe request. seconds stays the answered attempt's
own wait; retries are reported on stderr.

PHPUnit feature suite and Feature source qualification used a job-level
always(), which GitHub never cancels, so #724's superseded-run cancellation
left the old run holding the concurrency group. !cancelled() still runs
both jobs when a needed job failed, so the required checks stay fail-closed.
rmcdaniel added a commit that referenced this pull request Oct 24, 2026
…or its PHP leg

The SQLite job's main corpus now excludes update-validation.json. A separate
script records that fixture for php, embedded and rust and compares the three.
Its published PHP record runs with PHP's maintenance loop stopped: under that
loop's SQLite writer contention, PHP 2.11.1 loses its own validation-timeout
and lease-reclaim writes to "database is locked" and its validation poll
answers without the typed lock-pressure refusal (10 of 15 local runs failed
with the loop running, 5 of 5 and 3 of 3 passed with it stopped). Expected
results are unchanged. MySQL and PostgreSQL keep the fixture in their main
corpus with their loops running.

The runner gains --exclude-fixture, which must name a selected fixture and
cannot be combined with --fixture. The maintenance window helper is #722's,
moved to a shared path. Tests cover the selection rules, the workflow wiring
and every restore path of the helper.

PHPUnit Feature returns to main's job conditions and drops its concurrency
group. The central action policy requires always() on the PHPUnit feature
suite gate, and GitHub never cancels an always() job, so cancel-in-progress
would only queue a newer run behind it. Shared Server fixtures keeps #724's
cancellation.
@rmcdaniel
rmcdaniel merged commit f5bacd8 into main Oct 24, 2026
20 of 27 checks passed
@rmcdaniel

Copy link
Copy Markdown
Member Author

Merged to main through train #729 (merge 6121960), which Security accepted at exact head 18c1b3a.

@rmcdaniel
rmcdaniel deleted the rust-325-ci-cancel-superseded branch October 24, 2026 13:24
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.

1 participant