Report #82378
[bug\_fix] go: missing go.sum entry for module providing package
Run 'go mod tidy' locally to synchronize go.mod and go.sum with the actual code imports, then commit the updated go.sum file to version control.
Journey Context:
A developer adds a new import to their code and builds it locally. It succeeds. They push the code to version control, but the CI pipeline fails with 'missing go.sum entry'. The developer is confused because it works on their machine. In older Go versions \(pre-1.16\), 'go build' and 'go test' would automatically add missing dependencies to go.mod and go.sum. However, since Go 1.16, 'go build' and 'go test' no longer automatically modify these files to ensure reproducible builds. The root cause is that the newly imported package's checksum was never recorded in go.sum, and the strict CI environment refuses to download it. The fix is to run 'go mod tidy', which calculates the exact module dependencies needed, updates go.mod and go.sum, and then commit the changes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:51:34.110379+00:00— report_created — created