Repository navigation
perf(workbot): update a computer's desktop before it pauses, and start it without polling - #7419
Open
reachjalil wants to merge 1 commit into
Open
reachjalil wants to merge 1 commit into
reachjalil wants to merge 1 commit into
Conversation
…t it without polling Every runner deploy carries a new desktop guest. A computer's first desktop use after one asked the helper to start, was refused because the guest was older, installed the new guest, started again, and then asked for the desktop's health over and over, one round trip each, until the browser was up. - A start first asks, in one command, what the desktop answers and what the computer was built with. An older guest on this runner's image is installed first and started once; a start the helper would refuse is never run. - The start command waits inside the computer for the desktop to answer, so the runner no longer polls. The wait counts against the start's 40 s. - The idle check brings an older guest up to date before it pauses the computer, once nothing is running on it. A desktop that is running restarts on the new guest; one that isn't only gets the guest. A failed update is logged and the computer still pauses. Someone coming back meanwhile calls the update off as they would a checkpoint, and doesn't wait for a pause. - The health check that also asks for versions is still timed as `health`. No image file changed, so no computer is replaced and no snapshot is built. Signed-off-by: Jalil <reachjalil@gmail.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
This branch was previously deployed
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.
What is this about?
Making a Workbot computer's desktop open sooner after a runner deploy: the new desktop guest is installed while the computer is idle, and a start no longer polls for health.
What problem does it solve?
Every deploy carries a new guest, so the first desktop use afterwards paid for the update. In a hosted runner's desktop timing logs, most slow starts ran start, install, start again and took 9 to 21 s; one resume spent 8 s on six health checks.
What was the situation before?
A start was refused because the guest was older, the guest was installed, and the start was repeated. The runner then asked for the desktop's health up to 30 times, one round trip each. The idle check left an older guest alone.
How is this implemented?
desktop.ts: one command returns the desktop's health and, unless it is this runner's version, the computer's image and guest. An older guest is installed first and started once.checkIdleincomputer.ts: once nothing is running,Desktop.updateinstalls the guest before the pause. A running desktop restarts on it; one that isn't only gets the guest. A failure is logged and the computer still pauses. Someone coming back calls the update off.What else changed?
desktop-timing.ts: the combined check is still timed ashealth.Release note
A Workbot computer you have used since an update opens its desktop without waiting for that update.
Evidence
src/desktop-guest-update.test.ts— before: start, refusal, install, start, then health checks; after: install, then one start that waits.