Repository navigation
test: stop overrunning Squirrel.Mac updater runs and free their slots - #53536
Merged
Merged
Conversation
A pooled updater run that overran kept its slot and its processes, because a mocha timeout does not cancel the run. The retry then queued behind it, so on the Intel runners a single slow test could fail all of its attempts and take the shard past its step timeout. - Each run gets an AbortSignal and a budget that starts when it gets a slot, so time spent queued no longer counts against the test. - An aborted run kills the processes it started, removes its ShipIt job and clears its slot's downloaded updates. If it does not unwind, its slot is replaced with a fresh one. - Default to 2 concurrent runs on x64. The Intel runners do this work several times slower, and at 4 the slowest run came within 15% of its budget. ELECTRON_SPEC_UPDATER_RUN_BUDGET_MS overrides the budget, to exercise the abort path.
MarshallOfSound
marked this pull request as ready for review
September 4, 2026 17:51
codebytere
approved these changes
Sep 4, 2026
VerteDinde
approved these changes
Sep 4, 2026
|
No Release Notes |
Contributor
|
I was unable to backport this PR to "45-x-y" cleanly; |
Contributor
|
I was unable to backport this PR to "43-x-y" cleanly; |
Contributor
|
I was unable to backport this PR to "44-x-y" cleanly; |
Contributor
|
@MarshallOfSound has manually backported this PR to "43-x-y", please check out #53542 |
This was referenced Sep 4, 2026
Contributor
|
@MarshallOfSound has manually backported this PR to "44-x-y", please check out #53543 |
Contributor
|
@MarshallOfSound has manually backported this PR to "45-x-y", please check out #53544 |
MarshallOfSound
added a commit
that referenced
this pull request
Sep 4, 2026
…#53542) test: stop overrunning Squirrel.Mac updater runs and free their slots (#53536) A pooled updater run that overran kept its slot and its processes, because a mocha timeout does not cancel the run. The retry then queued behind it, so on the Intel runners a single slow test could fail all of its attempts and take the shard past its step timeout. - Each run gets an AbortSignal and a budget that starts when it gets a slot, so time spent queued no longer counts against the test. - An aborted run kills the processes it started, removes its ShipIt job and clears its slot's downloaded updates. If it does not unwind, its slot is replaced with a fresh one. - Default to 2 concurrent runs on x64. The Intel runners do this work several times slower, and at 4 the slowest run came within 15% of its budget. ELECTRON_SPEC_UPDATER_RUN_BUDGET_MS overrides the budget, to exercise the abort path. (cherry picked from commit 9272a1a)
MarshallOfSound
added a commit
that referenced
this pull request
Sep 4, 2026
…#53544) test: stop overrunning Squirrel.Mac updater runs and free their slots (#53536) A pooled updater run that overran kept its slot and its processes, because a mocha timeout does not cancel the run. The retry then queued behind it, so on the Intel runners a single slow test could fail all of its attempts and take the shard past its step timeout. - Each run gets an AbortSignal and a budget that starts when it gets a slot, so time spent queued no longer counts against the test. - An aborted run kills the processes it started, removes its ShipIt job and clears its slot's downloaded updates. If it does not unwind, its slot is replaced with a fresh one. - Default to 2 concurrent runs on x64. The Intel runners do this work several times slower, and at 4 the slowest run came within 15% of its budget. ELECTRON_SPEC_UPDATER_RUN_BUDGET_MS overrides the budget, to exercise the abort path. (cherry picked from commit 9272a1a)
MarshallOfSound
added a commit
that referenced
this pull request
Sep 4, 2026
…#53543) test: stop overrunning Squirrel.Mac updater runs and free their slots (#53536) A pooled updater run that overran kept its slot and its processes, because a mocha timeout does not cancel the run. The retry then queued behind it, so on the Intel runners a single slow test could fail all of its attempts and take the shard past its step timeout. - Each run gets an AbortSignal and a budget that starts when it gets a slot, so time spent queued no longer counts against the test. - An aborted run kills the processes it started, removes its ShipIt job and clears its slot's downloaded updates. If it does not unwind, its slot is replaced with a fresh one. - Default to 2 concurrent runs on x64. The Intel runners do this work several times slower, and at 4 the slowest run came within 15% of its budget. ELECTRON_SPEC_UPDATER_RUN_BUDGET_MS overrides the budget, to exercise the abort path. (cherry picked from commit 9272a1a)
This was referenced Sep 5, 2026
MarshallOfSound
added a commit
that referenced
this pull request
Sep 8, 2026
…, and serially on x64 (#53731) Brings the updater specs to main's shape in one step: a stripped, deep-signed template app cloned per fixture with a shallow re-sign (#53437), per-run budgets and clean stops of overrunning runs (#53536, #53607), and the split into lifecycle and policy files that run serially on x64 (#53663). The harness uses express here as the branch has no routed-server helper. (cherry picked from commit 57ab2fc)
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #53437. On the Intel macOS runners, one slow updater test could fail all four of its attempts. The shard then hit the 60 minute step timeout. That happened on about 1 in 40 x64 shards.
Two things caused it:
Changes, all in
spec/api-autoupdater-darwin-spec.ts:AbortSignaland a budget of twice its test timeout. The budget starts when the run gets a slot, so time spent queued does not count. The mocha timeout is now only a backstop.relaunched()rejects on abort. If a run does not unwind within 20s, its slot is replaced with a fresh one.ELECTRON_SPEC_UPDATER_RUN_BUDGET_MSoverrides the budget, to exercise the abort path.Measured on a stress branch, against a
mainTesting build, on the CI runners (macos-15-large, first iteration on a fresh runner):No retries in 10 runs at concurrency 2. Locally, with a 6s budget, every run was aborted and cleaned up, and no processes or launchd jobs were left behind.
Notes: none