Repository navigation
CI: keep the Go module cache writable so the runner can restore it - #71
Merged
Merged
Conversation
Dockiva Engine (<= 0.6.10) refuses root's mkdir inside a read-only directory. Go makes module cache directories read-only, and tar, run as root, creates them with that mode before their contents, so restoring the cache on the Dockiva runner dropped 16,827 entries and every build since the cache was first saved (2026-11-13) failed on missing files. GOFLAGS=-modcacherw leaves the directories writable. The cache saved with read-only directories has to be deleted once, since its key does not change.
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.
Why CI is red
Every
Build and testrun since 2026-11-13 13:48 UTC has failed on the Dockiva runner with errors like:setup-go-Linux-arm64-undefined-…). Earlier runs had no cache and downloaded modules each time.tarruns as root, so it creates each directory with that mode before its contents.mkdirinside a read-only directory. Linux allows it. The restore step logged 16,827Cannot mkdir: Permission denied/Cannot openlines and left a partial cache, whichgotrusts.Repro on Dockiva 0.6.10:
Change
GOFLAGS=-modcacherwfor the job, so the directories stay writable and the saved cache restores. The comment says to drop it once the engine is fixed.The cache saved with read-only directories (id 10477291193) is deleted, because its key does not change with this PR.
Checks
go.modin agolang:1.26.3container on Dockiva 0.6.10:go mod downloadunderGOFLAGS=-modcacherwleaves 0 read-only directories out of 3,655; the archive (tar --posix -cf … -P) restores in a fresh container with 0 errors and all 14,603 files, andGOPROXY=off go mod verifyreportsall modules verified.The engine bug itself (root also cannot
symlink,mkfifoorrmdirthere) is not fixed here.