Skip to content

ci: tolerate a concurrent rerun and transient artifact upload errors - #111

Merged
phcorp merged 1 commit into
mainfrom
ci/rerun-race-and-upload-flakes
Nov 30, 2026
Merged

phcorp merged 1 commit into
mainfrom
ci/rerun-race-and-upload-flakes

Conversation

@phcorp

@phcorp phcorp commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Fixes two CI flakes that showed up while I worked through the earlier PRs.

  • runner-retry race (run 45456810366): the retry job inspected a run as completed, but someone else reran it before the retry job's request. GitHub answered HTTP 403 This workflow is already running, and the retry job failed. The rerun closure now reports that refusal. The job then ends successfully and leaves that attempt to the other rerun, whose completion starts runner-retry again. Any other API error still fails the job. A new tool test covers this; it fails if the check is reverted.
  • Artifact upload flake (run 46271695479, attempt 1): c-mutation passed, but the diagnostic upload-artifact step failed with ECONNRESET and failed the gate. No job downloads these artifacts, so all eight uploads now use continue-on-error: true.

Checks run locally:

  • tests/tools/RunnerRetryTest.php: 12 passed.
  • actionlint: clean.
  • mago fmt: clean.

@phcorp
phcorp merged commit 1a0c605 into main Nov 30, 2026
53 checks passed
@phcorp
phcorp deleted the ci/rerun-race-and-upload-flakes branch November 30, 2026 09:26
phcorp added a commit that referenced this pull request Nov 30, 2026
…l check (#113)

Fixes the five nits from `/code-review 1a0c605^..6874ff2` (#111–#112).

- **Changelog:** the alpha.23 correction under `[Unreleased]` said
non-worker calls behaved "as before alpha.22". alpha.21 also returned
without calling FrankenPHP: its pending-fatal check, added by #99, sat
outside `if (wrap)`. It now says "as before alpha.21".
- **Off worker runs:** #112 served them with no interrupt hook, so
nothing on Linux checked any longer that the sampling hook raises the
worker's deferred fatal error. Each mode now runs twice:
- `PROFILER_TEST_WORKER_INTERRUPT=none` checks the `false` result and
the pending error, on every platform;
- `keep` requires the real hook to raise the error where sampling is
supported.
- **`profiler_test_sampling_bailout_order()`:** it no longer restores
`EG(vm_interrupt)`, which could erase a sampling tick or signal
requested in the meantime. An extra interrupt is harmless, since
`sample_interrupt` ignores interrupts it didn't request.
`CG(unclean_shutdown)` and GC protection are still restored.
- **Rerun refusal:** the check moved into
`RunnerRetry::alreadyRunning()` and now requires both GitHub's message
and `HTTP 403`. It is tested against gh's real output from run
45456810366.
- **Rerun closure result:** `retry()` now throws if the closure returns
anything other than a bool, so a void closure can no longer read as
"already rerun elsewhere".

The ledger hashes are renewed, with an audit note.

Checks run locally (macOS):
- `RunnerRetryTest`: 14 passed. Reverting the bool check, or the `HTTP
403` match, fails one test each.
- `scripts/native-unit-tests.sh` passes, with all four Off runs.
- `make fmt-check` passes.

Not checked locally: the `keep` assertion can only fail on Linux, where
sampling is supported. CI runs it there; I haven't run a break test for
it.
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