fix(go-ci): stage per-function coverage in RUNNER_TEMP, not shared /tmp#33
Open
monsieurleberre wants to merge 1 commit into
Open
fix(go-ci): stage per-function coverage in RUNNER_TEMP, not shared /tmp#33monsieurleberre wants to merge 1 commit into
monsieurleberre wants to merge 1 commit into
Conversation
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.
Closes #12.
Context
Issue #12 reported
go-ci.yaml's coverage step failing on the self-hosted Hetzner runner because it calledsudo. Thatsudo chownwas already removed in PR #29 (commit115dc93, released v2.3.2) — the step now takes ownership of the root-owned coverage report via a same-directorycp+mv -fcopy that needs only workspace permissions. The issue stayed open only because #29 never linked it. Independently confirmed: nosudoinvocation remains anywhere ingo-ci.yamlondev.This change
Hardens the one residual self-hosted hazard in the same step. Per-function coverage was staged at the fixed path
/tmp/cov-func.txt. On shared Hetzner hosts/tmpoutlives the job and is shared across runner instances, so a leftover file owned by another runner user fails the step with permission-denied (same failure class as the v2.3.3 dotnet-coverage fix), and concurrent Go jobs on one host can cross-contaminate the coverage column. It now uses"$RUNNER_TEMP/cov-func.txt"— per-runner-instance, emptied at the start and end of every job. Behavior on GitHub-hosted runners is unchanged.Verification
actionlintclean;shellcheck -s bashclean on the extracted step script./tmp/cov-func.txtreference remains.Note for closing
v1(frozen atd072766) still contains the originalsudo chown;@v1consumers must migrate to@v2.