fix: make a renamed runner's bin and externals links relative - #74
Merged
Conversation
GitHub's runner updater points bin and externals at its versioned directories with absolute symlinks, so moving a runner directory takes two dangling links with it and ./config.sh dies on a missing Runner.Listener before registering anything. Every runner install has them, so rename failed on the first runner every time. migrate-storage has always rewritten them relative. rename did not reuse that helper, which is now named for what it does rather than for the one command that used to call it. The test did not catch this because its fake config.sh ignored the links. It now refuses unless ./bin/Runner.Listener resolves, as the real one does, and the fixture carries absolute links like a real install. Closes #73
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.
Closes #73. Found by running
renameagainst a real pool.GitHub's runner updater points
binandexternalsat its versioned directories with absolute symlinks.renamemoves the runner directory, both links dangle, and./config.shdies on a missingRunner.Listenerbefore it registers anything. Every runner installation has these links, sorenamefailed on the first runner every time.migrate-storagehas always handled it.renamedid not reuse the helper, which is now named_rp_rewrite_runner_linksrather than for the single command that used to call it. Rewriting relative also makes the installation self-contained, so it survives being moved again.Why the test missed it. Its fake
config.shdid not care about the links, so it passed whether or not they were rewritten. It now refuses unless./bin/Runner.Listenerresolves, exactly as the real one does, and the fixture carries absolute links like a real install. Reverting just the library change now fails the test.bash -n,shellcheck --severity=warningand all ten tests pass.