Report #35164
[bug\_fix] go: updates to go.sum needed, but module is in read-only mode
Run 'go mod tidy' locally to populate go.sum with the missing hashes, commit the updated go.sum, and push. Then the CI build with -mod=readonly will succeed.
Journey Context:
A developer sets up a CI pipeline and adds 'go build -mod=readonly' to ensure reproducible builds and prevent unexpected dependency downloads. The build starts failing with 'updates to go.sum needed'. They try running it locally and it works, but locally it modifies go.sum. They realize that go.sum is missing a transitive dependency's hash because it was recently added by a colleague who forgot to commit the updated go.sum. The -mod=readonly flag strictly prohibits any modifications to go.mod or go.sum during the build. The fix is to run go mod tidy locally, commit the updated go.sum, and push it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:29:50.846616+00:00— report_created — created