Skip to content

fix(gha-runners): restore cargo PATH after sudo re-exec#69

Merged
wavekat-eason merged 1 commit into
mainfrom
fix/gha-runner-cargo-path
May 21, 2026
Merged

fix(gha-runners): restore cargo PATH after sudo re-exec#69
wavekat-eason merged 1 commit into
mainfrom
fix/gha-runner-cargo-path

Conversation

@wavekat-eason
Copy link
Copy Markdown
Contributor

Summary

  • The runner Dockerfile installs Rust system-wide under /usr/local/cargo/bin and sets it on PATH via ENV, but entrypoint.sh re-execs itself as the runner user via sudo. sudo replaces PATH with sudoers' secure_path and --preserve-env doesn't list PATH, so the runner process — and every workflow step it spawns — loses cargo/rustc.
  • Re-prepend /usr/local/cargo/bin to PATH inside the entrypoint after the sudo drop, so cargo is visible to ./run.sh and all child step shells.

Rollout

Image needs to be rebuilt on the runner host for the fix to take effect:

docker build -t wavekat/gha-runner:latest scripts/docker
# then restart each runner container

Test plan

  • Rebuild image on aoc-m3l, restart a runner container
  • Re-run the failing release-please job and confirm cargo is on PATH

🤖 Generated with Claude Code

sudo replaces PATH with sudoers' secure_path on the runner
re-exec, dropping /usr/local/cargo/bin and breaking workflows
that shell out to cargo/rustc. Re-prepend it after the drop.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

@wavekat-eason wavekat-eason merged commit 15f8f2c into main May 21, 2026
2 checks passed
@wavekat-eason wavekat-eason deleted the fix/gha-runner-cargo-path branch May 21, 2026 09:25
wavekat-eason pushed a commit that referenced this pull request May 21, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.0.24](wavekat-com-v0.0.23...wavekat-com-v0.0.24)
(2026-05-21)


### Features

* **star-tracker:** operator /_admin tenant list
([#67](#67))
([2663192](2663192))


### Bug Fixes

* **gha-runners:** restore cargo PATH after sudo re-exec
([#69](#69))
([15f8f2c](15f8f2c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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