Skip to content

fix(ci): skip apt when deps present (runner has no passwordless sudo) - #224

Merged
thcp merged 1 commit into
mainfrom
fix/linux-apt-skip-when-present
Jun 24, 2026
Merged

fix(ci): skip apt when deps present (runner has no passwordless sudo)#224
thcp merged 1 commit into
mainfrom
fix/linux-apt-skip-when-present

Conversation

@thcp

@thcp thcp commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Root cause (finally)

The Linux release hung on install build dependencies because the wsl2 self-hosted runner does not have passwordless sudosudo apt-get blocks forever at the password prompt that CI can't answer.

My earlier sudo timeout 420 apt-get … guard did nothing: timeout runs inside sudo, so sudo prompts before timeout can start. The cap never applied.

Fix

The deps are already installed on the persistent runner, so:

  • Check each package with dpkg -s (no sudo) and skip apt entirely when all are present — the normal case on this runner. No sudo, no hang.
  • Only if a package is genuinely missing, use 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:

echo "$(whoami) ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/github-runner

Windows binaries are already published to alpha.17; this unblocks Linux.

🤖 Generated with Claude Code

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.
@thcp
thcp merged commit ab832e3 into main Jun 24, 2026
8 checks passed
@thcp
thcp deleted the fix/linux-apt-skip-when-present branch June 24, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant