fix(forgejo-runner): provide GNU tar with hiPrio over busybox - #895
Closed
natsukium wants to merge 2 commits into
Closed
fix(forgejo-runner): provide GNU tar with hiPrio over busybox#895natsukium wants to merge 2 commits into
natsukium wants to merge 2 commits into
Conversation
BusyBox tar lacks `--posix` which `Swatinem/rust-cache` and `actions/cache` require to save the cargo cache. The nix runner's hostPackages exposed only busybox's tar, so every cache save failed with `tar: unrecognized option '--posix'` (seen in felis PR #57 logs, `Failed to save: tar exit code 1`). Add `gnutar` with `hiPrio` so GNU tar shadows busybox's tar on PATH. The internal per-runner cache (forgejo-runner cache.enabled=true) can then actually store the cargo registry/target and speed up `cargo build`/`clippy`/`nextest`. Why hiPrio: both busybox and gnutar provide `bin/tar`; without priority busybox wins due to list order and the cache action would still see BusyBox tar. Assisted-by: Pi Coding Agent:Muse Spark 1.2
This comment has been minimized.
This comment has been minimized.
…d order Previous fix used `hiPrio` from pkgs (deprecated, warning `hiPrio has been removed from pkgs, use lib.hiPrio`) and placed gnutar after busybox, so PATH remained `.../busybox/bin:.../gnutar/bin` and `actions/cache` still saw BusyBox tar (`tar --posix` fails, seen in felis#57 logs for 3bd9211a where save failed with busybox tar). HostPackages PATH is built via `lib.makeBinPath` which respects list order, not just priority. Put `(lib.hiPrio gnutar)` before busybox so GNU tar is found first. The internal per-runner cache can then actually save the cargo cache (actions/cache@v4, key over Cargo.lock+flake.lock). Assisted-by: Pi Coding Agent:Muse Spark 1.2
Nix DiffkilimanjaroAttribute: Diff OutputmanyaraAttribute: Diff OutputtarangireAttribute: Diff OutputserengetiAttribute: Diff OutputarushaAttribute: Diff OutputkataviAttribute: Diff OutputmikumiAttribute: Diff OutputworkAttribute: Diff Output
Generated by nix-diff-action using dix |
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.
BusyBox
tarlacks--posixwhichSwatinem/rust-cache/actions/cacherequire to save the cargo cache. Thenixrunner'shostPackagesexposed only busybox'star, so every cache save failed with:Seen in
natsukium/felis#57logs. The per-runner internal cache (cache.enabled=trueon kilimanjaro) never stored anything, socargo build/clippy/nexteststayed cold.Add
gnutarwithhiPrioso GNU tar shadows busybox'staronPATH. Both providebin/tar, so priority matters.modules/configuration.org(source) + tanglemodules/features/forgejo-runner/default.nixfeliswill re-enableSwatinem/rust-cachewithcmd-format: "nix develop -c {0}"once this hosts fix lands (currently using aGITHUB_PATHworkaround withnixpkgs#gnutar).Test: after deploy to kilimanjaro,
tar --versionon anix:hostjob should reportGNU tar 1.35andSwatinem/rust-cachepost should showCache savedinstead ofFailed to save.