chore: bump go directive and fix trivy CVEs in go.mod#108
Open
keegancsmith wants to merge 3 commits intomainfrom
Open
chore: bump go directive and fix trivy CVEs in go.mod#108keegancsmith wants to merge 3 commits intomainfrom
keegancsmith wants to merge 3 commits intomainfrom
Conversation
The PR moved the module to Go 1.25.9, but the workflow was still booting Go 1.22.x. That left Actions auto-switching toolchains mid-job, rewrote go.mod/go.sum during tidy, and broke the test step before the branch could prove the dependency updates. This aligns the workflow with the declared toolchain, commits the tidy output produced by Go 1.25.9, and migrates the golangci-lint config to the v2 schema so the workflow's latest linter still runs after the tidy step succeeds. Test Plan: - GOTOOLCHAIN=go1.25.9 go mod tidy - GOTOOLCHAIN=go1.25.9 go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic -json ./... > test-report.json - GOTOOLCHAIN=go1.25.9 golangci-lint run --timeout=30m Amp-Thread-ID: https://ampcode.com/threads/T-019dd892-fa9b-741b-9d07-e0cca9f7a850 Co-authored-by: Amp <amp@ampcode.com>
The lint workflow was still invoking golangci-lint-action v3, which currently resolves to a v1.64 binary built with Go 1.24. Once the PR moved the module to Go 1.25.9, that linter could no longer even load the configuration, so the lint job failed after the module tidy step was fixed. Switching the action to a v2-capable release and pinning a current v2 binary keeps linting on a toolchain new enough to understand the module version the PR now targets. Test Plan: - Inspect the failing GitHub Actions log for job 73551483658 - Confirm the failure is "the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.25.9)" - Update the workflow to use golangci/golangci-lint-action@v9 with golangci-lint v2.11.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was generated by Sourcegraph Batch Changes.
Changes
godirective:go 1.25.9for modules currently below 1.26go 1.26.2for modules already on 1.26.xtoolchaindirective (toolchain selection is handled automatically)go mod tidyto keepgo.sumconsistent with the new directivetrivy fs go.modby upgrading specific transitivedependencies to their minimum safe versions
Why
Ensures a consistent, secure Go toolchain version across all first-party
github.com/sourcegraph/*modules that are depended on bysourcegraph/sourcegraph.Hatched by a Sourcegraph egg.