ci: fix Go cache perms in mx-sdk container#171
Merged
Conversation
The Linux (Go + C targets) job runs the container as the caller's
uid:gid, which has no passwd entry, so HOME defaults to "/". Go then
places GOPATH at /go and GOCACHE at /.cache/go-build, both unwritable,
and `make test-go` dies with:
could not create module cache: mkdir /go: permission denied
Pin GOPATH/GOCACHE/GOMODCACHE under the writable build volume,
mirroring CCACHE_DIR. The Go module is vendored, so no network fetch
is required.
gen-quality
|
Coverage reportCore-dev coverage
|
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 77.9% | 28505 / 36590 |
| Functions | 74.4% | 6354 / 8542 |
| Branches | 50.7% | 22645 / 44673 |
API coverage src/private/mx/{api,impl,utility}/
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 68.7% | 4734 / 6895 |
| Functions | 53.5% | 1507 / 2816 |
| Branches | 40.3% | 3851 / 9562 |
Core HTML report | API HTML report
Commit ccc0507e7edc67e9d9fa7e76297f3f831443802a.
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.
Problem
The
Linux (Go + C targets)CI job fails at the Go corert suite step(run):
The
DOCKER_RUNrecipe runs themx-sdkcontainer as the caller'suid:gid(
--user 1001:1001on the runner). That UID has no/etc/passwdentry, soHOMEdefaults to/. Go then derivesGOPATH=/goandGOCACHE=/.cache/go-build, neither of which the unprivileged user can create.The C++ jobs don't hit this because the Dockerfile already pins
CCACHE_DIRto the writable
/workspace/buildvolume; Go had no equivalent override.Fix
Pin
GOPATH,GOCACHE, andGOMODCACHEunder the writable/workspace/buildvolume in the Dockerfile, exactly mirroring
CCACHE_DIR. The Go module isvendored (
gen/test/go/vendor/), so no network fetch is needed.Base
Targets
musicxml-4.0so that merging this folds the fix into PR #169.