Fix git ownership and -race in the canonical Go Dockerfile (closes #73)
check / check (push) Successful in 52s
check / check (push) Successful in 52s
The canonical Go `Dockerfile` example in `prompts/REPO_POLICIES.md` had two defects. The test phase ran `go test -race` on the alpine Go image, which has no C compiler, so `-race` failed before any test ran. The test phase now uses the Debian Go image, pinned by digest like the others. A build context sent as a tar stream keeps the sender's file owners, so git refused the checkout and the version step failed the build. The builder stage now runs `git config --system --add safe.directory /src`; the policy and both checklists say why in the same words. The builder's `apk add --no-cache git` line is unchanged: whether it must be pinned is the open owner question on #72. Model: opus-5-5
This commit was merged in pull request #82.
This commit is contained in:
@@ -21,6 +21,13 @@ fmt-check, and commit.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-03: Fixed two defects in the canonical Go `Dockerfile` example (issue
|
||||
73). The test phase now uses the Debian Go image, since `-race` needs cgo and
|
||||
the alpine image has no C compiler, so the phase failed before running a test.
|
||||
The stage that compiles runs `git config --system --add safe.directory /src`,
|
||||
because a context sent as a tar stream keeps the sender's file owners and git
|
||||
refuses that checkout, leaving the version empty. Both checklists state that
|
||||
step in the same words.
|
||||
- 2026-10-03: Moved the canonical golangci-lint to v2.14.0, built with go1.27,
|
||||
because v2.12.2 refuses to lint a module whose `go` directive is 1.27 (issue
|
||||
65). Releases from v2.13.0 deprecate `exhaustruct` in favour of
|
||||
|
||||
Reference in New Issue
Block a user