Skip to content

test: stop aborted Squirrel.Mac updater runs cleanly - #53619

Merged
MarshallOfSound merged 3 commits into
44-x-yfrom
trop/44-x-y-bp-test-stop-aborted-squirrel-mac-updater-runs-cleanly-1788683560986
Sep 6, 2026
Merged

MarshallOfSound merged 3 commits into
44-x-yfrom
trop/44-x-y-bp-test-stop-aborted-squirrel-mac-updater-runs-cleanly-1788683560986

Conversation

@trop

@trop trop Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Backport of #53607

See that PR for details.

Notes: none

trop Bot and others added 3 commits September 6, 2026 08:32
When a pooled updater run overran its budget, stopping it could throw
ENOTEMPTY from removing the slot's update directory, because the app it
had just SIGKILL'd still held files there open. That error replaced the
run's own, and the retry then queued behind the other slot with no bound
on the wait, so one slow test could take a shard past its step timeout.

- Each fixture app is spawned as its own process group, so it and anything
  it starts (helpers, ditto) are killed together. ShipIt is a launchd job
  and is still stopped by removing it.
- stopRun waits for the killed groups to be gone before touching the
  filesystem, retries the removal for a few seconds, and never throws; a
  slot it cannot clean is retired. The suite's after hook uses the same
  retrying removal.
- A retry waits at most its budget for a slot, then retires one, instead
  of waiting silently for a stuck lookahead run to finish.

Co-authored-by: Samuel Attard <[email protected]>
ShipIt runs from inside the fixture app bundle, so the process-group kill
does not reach it: launchd spawns it. Removing its launchd job does not
reliably stop one mid-install either, so an aborted run left a ShipIt
copying and verifying the bundle, and the next runs on a slow runner
crawled. Kill by path as well, loop until nothing under the run's app
paths is left, refuse spawns once a run is aborted, clear ShipIt's
install-attempt counter, and sweep every fixture app path in the suite's
after hook.

Co-authored-by: Samuel Attard <[email protected]>
… once

When a run hits its budget, print the busiest processes, everything still
running from the run's apps, and the slot's ShipIt log, while they are
still there. The last two CI timeouts could only be read as guesses.

A retry is the test mocha is blocked on. It now takes a free slot or a
fresh one immediately instead of waiting its whole budget behind lookahead
runs for later tests, which doubled the cost of every retry.

Co-authored-by: Samuel Attard <[email protected]>
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) September 6, 2026 08:36
@MarshallOfSound MarshallOfSound self-assigned this Sep 6, 2026
@MarshallOfSound
MarshallOfSound merged commit d79d0fe into 44-x-y Sep 6, 2026
91 checks passed
@MarshallOfSound
MarshallOfSound deleted the trop/44-x-y-bp-test-stop-aborted-squirrel-mac-updater-runs-cleanly-1788683560986 branch September 6, 2026 09:24
@release-clerk

release-clerk Bot commented Sep 6, 2026

Copy link
Copy Markdown

No Release Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant