Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@ Tests use build tags with different timeouts:
compatibility (e.g., `quay.io/enterprise-contract/ec-cli`, Tekton parameter names) must be
preserved as-is.

## Go Version Consistency

These files must all declare the same Go version:

1. `go.mod` (line 3: `go X.Y.Z`)
2. `acceptance/go.mod` (`go X.Y.Z`)
3. `tools/go.mod` (`go X.Y.Z`)
4. `tools/kubectl/go.mod` (`go X.Y.Z`)
5. `.tool-versions` (`golang X.Y.Z`)
6. `Dockerfile` (`FROM golang:X.Y.Z@sha256:...`)
7. `Dockerfile.dist` (`FROM go-toolset:X.Y.Z@sha256:...`)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] technical documentation accuracy

The Dockerfile.dist entry abbreviates the image as FROM go-toolset:X.Y.Z@sha256:... but the actual FROM line uses registry.access.redhat.com/ubi9/go-toolset:1.26.7@sha256:.... Dropping the ubi9/ path segment reduces greppability for reviewers checking version consistency. The Dockerfile entry abbreviating docker.io/library/golang to golang is standard Docker Hub convention and not misleading.

Suggested fix: Change item 7 to Dockerfile.dist (FROM ubi9/go-toolset:X.Y.Z@sha256:...) to preserve the distinguishing path component.

**Reviewer guidance:** When any PR modifies a Go version in one of these files,
verify all seven files declare the same version. Mismatches between `go.mod` and
Dockerfile base images can cause build failures when `GOTOOLCHAIN=local` is set.
Dockerfile image tags also require updated `@sha256:` digests — a version bump
without a corresponding digest update will pull a stale or incorrect image.

## Go file header convention

Go source files in this repository place the SPDX license header comment
Expand Down
Loading