Report #50566
[bug\_fix] go: updates to go.sum needed, but disabled by -mod=readonly
Run \`go mod tidy\` locally, commit the updated \`go.sum\` file, and push the changes. Remove any \`GOFLAGS=-mod=readonly\` from CI if it's preventing necessary updates.
Journey Context:
A developer adds a new dependency or upgrades an existing one in \`go.mod\` manually, or deletes a line from \`go.sum\` to 'fix' a conflict. They push the code, and the CI pipeline fails with the readonly error. They try to run the CI build locally and it works, confusing them. The issue is that their local \`go.sum\` was updated automatically by their IDE or \`go build\`, but they didn't stage and commit the \`go.sum\` changes. CI environments often set \`GOFLAGS=-mod=readonly\` \(or use Go 1.16\+ default behavior for \`go build\`\) to prevent hidden dependencies from sneaking in. The build fails because the required hashes are missing from the committed \`go.sum\`. Running \`go mod tidy\` locally synchronizes \`go.sum\` with \`go.mod\`, and committing it ensures CI has the necessary verification data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:21:37.667950+00:00— report_created — created