Repository navigation
Retry failed runner runs instead of retiring the slot - #26
Merged
Merged
Conversation
In endless mode a failed runOnce now goes through RestartBackoff (1s doubling to 60s) instead of ending that slot for good. Leftover VMs with the runner's name are deleted before clone. Runner names must not match any local vm.source.name and are unique ignoring case.
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
runOncenow goes throughRestartBackoff(1s, doubling up to 60s, reset after a successful run) instead of ending that runner slot. The VM is cleaned up before the retry.tart clonewon't overwrite it. Mount paths are now checked before cloning, so a bad path doesn't leave a cloned VM behind.vm.source.name, and runner names must be unique ignoring case.stopAftermode still fails fast on the first error.Why
One failed run (e.g. two slots cloning the same image at once) used to retire its slot for good. sand kept running the other slots, so launchd never restarted it and the slot stayed dead silently.
The name checks protect the new leftover-VM delete: a runner named like a local source image would otherwise delete that image. They're case-insensitive because Tart VMs are directories and macOS volumes are case-insensitive by default.
Breaking: configs with runner names that differ only in case (
Mac/mac) are now rejected at startup. They already shared one VM directory, so they never worked.Testing
swift test: all 60 tests pass, including newRunnerRetryTests(slot retries after a failure, deletes the leftover VM before each clone, stops on cancel) and the name-collision validator tests.Tests/cases/stale_vm_replaced.t. Locally I could only verify the leftover-VM delete and re-clone: the VM got no IP on my machine (host networking issue), so the job itself never ran. Please run it on a host with working Tart networking.stopAfterrun. Check the log for aVM IPline.