Repository navigation
run-testbox: make the idle-activity loop portable so a macOS testbox is not shut down after its first command - #18
Draft
aayushshah15 wants to merge 1 commit into
Draft
aayushshah15 wants to merge 1 commit into
aayushshah15 wants to merge 1 commit into
Conversation
ss(8) and GNU stat -c do not exist on macOS. Under bash -e the BSD stat failure exited the loop (and the testbox) right after the first command. Fall back to netstat and stat -f %m when the GNU tools are unavailable. Co-Authored-By: aayush@blacksmith.sh <aayush.shah15@gmail.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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.
Summary
Bug fix — the idle-timeout loop used
ss -tnpand GNUstat -c %Y, neither of which exists on macOS. Under the step'sbash -e,stat: illegal option -- cexits the loop as soon as~/.testbox-last-activityexists, i.e. right after the firstblacksmith testbox run, ending the job and the testbox.The loop now goes through two small helpers:
ss -tndrops the-pflag: process names were never used, and-pneeds root to resolve other users' sockets.Risks
Linux runners take the same
ss/GNUstatpaths as before. Thev2tag is not moved by this PR.Link to Devin session: https://app.devin.ai/sessions/1dab8a9eae1a4a8bbe2f9f0a79065a67
Open in Devin Desktop: https://app.devin.ai/desktop/session/1dab8a9eae1a4a8bbe2f9f0a79065a67?variant=devin
Requested by: @aayushshah15
Need help on this PR? Tag
@codesmith-botwith what you need.Need help on this PR? Tag
@codesmith-botwith what you need. (Staging)