fix(ci): skip apt when deps present (runner has no passwordless sudo) - #224
Merged
Conversation
Root cause of the Linux apt hang: the wsl2 self-hosted runner does not have passwordless sudo, so 'sudo apt-get' blocks forever at the password prompt. The previous 'sudo timeout ... apt-get' guard did nothing because sudo prompts BEFORE the inner timeout can start. Since the build deps are already installed on the persistent runner, check each package with dpkg (no sudo) and skip apt entirely when all are present. Only touch apt if something is genuinely missing, using 'sudo -n' so it fails fast with a clear message instead of hanging at a prompt.
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.
Root cause (finally)
The Linux release hung on
install build dependenciesbecause thewsl2self-hosted runner does not have passwordless sudo —sudo apt-getblocks forever at the password prompt that CI can't answer.My earlier
sudo timeout 420 apt-get …guard did nothing:timeoutruns insidesudo, so sudo prompts before timeout can start. The cap never applied.Fix
The deps are already installed on the persistent runner, so:
dpkg -s(no sudo) and skip apt entirely when all are present — the normal case on this runner. No sudo, no hang.sudo -n(non-interactive) so it fails fast with a clear message instead of hanging.Recommended runner fix (separate)
Give the runner passwordless sudo so apt works if deps ever change:
Windows binaries are already published to alpha.17; this unblocks Linux.
🤖 Generated with Claude Code