Skip to content

Commit 0fc4606

Browse files
authored
Stop pinning Go to patch versions, use stable in CI (#1137)
<!-- Provide a brief summary of your changes --> ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> We keep bumping `go 1.26.x` across the repo every time a new Go patch drops ## How Has This Been Tested? <!-- Have you tested this in a real application? Which scenarios were tested? --> - **`go.mod` / `deploy/go.mod`**: `go 1.25.8` → `go 1.26` (minor only — "this module needs Go 1.26") - **All CI workflows**: `go-version-file: 'go.mod'` → `go-version: 'stable'` — CI always uses the latest stable Go, no more bump PRs - **govulncheck**: removed hardcoded `go-version-input: '1.26.1'` → `go-version-input: 'stable'` ## Breaking Changes <!-- Will users need to update their code or configurations? --> ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [ ] My code follows the repository's style guidelines - [ ] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed ## Additional context <!-- Add any other context, implementation notes, or design decisions --> Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
1 parent 9b32a5c commit 0fc4606

13 files changed

Lines changed: 23 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121
- name: Set up Go
2222
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
2323
with:
24-
go-version-file: 'go.mod'
24+
go-version: 'stable'
2525
cache: true
2626

2727
- name: Run lint
2828
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20
2929
with:
30-
version: v2.4.0
30+
version: v2.11.4
3131

3232
- name: Validate schemas and examples
3333
run: make validate
@@ -38,9 +38,7 @@ jobs:
3838
- name: Run govulncheck
3939
uses: golang/govulncheck-action@v1
4040
with:
41-
# Use Go 1.26.1 to pick up crypto/x509 vulnerability fixes (GO-2026-4600, GO-2026-4599).
42-
# go.mod stays at go 1.25.8 for golangci-lint compatibility until it supports Go 1.26.
43-
go-version-input: '1.26.1'
41+
go-version-input: 'stable'
4442
go-package: ./...
4543
repo-checkout: false
4644

@@ -55,7 +53,7 @@ jobs:
5553
- name: Set up Go
5654
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
5755
with:
58-
go-version-file: 'go.mod'
56+
go-version: 'stable'
5957
cache: true
6058

6159
- name: Set up ko

.github/workflows/deploy-production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup Go
2929
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
3030
with:
31-
go-version-file: 'deploy/go.mod'
31+
go-version: 'stable'
3232
cache: true
3333

3434
- name: Setup Pulumi

.github/workflows/deploy-staging.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up Go
2828
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
2929
with:
30-
go-version-file: 'go.mod'
30+
go-version: 'stable'
3131
cache: true
3232

3333
- name: Set up ko
@@ -75,7 +75,7 @@ jobs:
7575
- name: Setup Go
7676
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
7777
with:
78-
go-version-file: 'deploy/go.mod'
78+
go-version: 'stable'
7979
cache: true
8080

8181
- name: Setup Pulumi

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Go
2222
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
2323
with:
24-
go-version-file: 'go.mod'
24+
go-version: 'stable'
2525
cache: true
2626

2727
- name: Install cosign
@@ -50,7 +50,7 @@ jobs:
5050
- name: Set up Go
5151
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
5252
with:
53-
go-version-file: 'go.mod'
53+
go-version: 'stable'
5454
cache: true
5555

5656
- name: Set up ko

.golangci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ linters:
6666
- common-false-positives
6767
- legacy
6868
- std-error-handling
69+
rules:
70+
# httptest.NewRequest is idiomatic in tests; noctx is not useful there.
71+
- path: _test\.go
72+
linters:
73+
- noctx
6974
paths:
7075
- third_party$
7176
- builtin$

cmd/publisher/auth/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func parseRawPrivateKey(curve elliptic.Curve, privateKeyBytes []byte) (*ecdsa.Pr
160160
return nil, fmt.Errorf("invalid private scalar")
161161
}
162162

163-
x, y := curve.ScalarBaseMult(d.Bytes())
163+
x, y := curve.ScalarBaseMult(d.Bytes()) //nolint:staticcheck // SA1019: needs crypto/ecdh refactor
164164
return &ecdsa.PrivateKey{
165165
PublicKey: ecdsa.PublicKey{
166166
Curve: curve,
@@ -192,7 +192,7 @@ func PrintEcdsaP384KeyInfo(pubKey ecdsa.PublicKey) {
192192
}
193193

194194
func printEcdsaKeyInfo(k string, pubKey ecdsa.PublicKey) {
195-
compressed := elliptic.MarshalCompressed(pubKey.Curve, pubKey.X, pubKey.Y)
195+
compressed := elliptic.MarshalCompressed(pubKey.Curve, pubKey.X, pubKey.Y) //nolint:staticcheck // SA1019: needs crypto/ecdh refactor
196196
pubKeyString := base64.StdEncoding.EncodeToString(compressed)
197197
fmt.Fprint(os.Stdout, "Expected proof record:\n")
198198
fmt.Fprintf(os.Stdout, "v=MCPv1; k=%s; p=%s\n", k, pubKeyString)

cmd/publisher/auth/github-oidc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func (o *GitHubOIDCProvider) getOIDCTokenFromGitHub(ctx context.Context) (string
122122
fullURL := requestURL + "&audience=mcp-registry"
123123

124124
// Create the request
125-
req, err := http.NewRequestWithContext(ctx, http.MethodGet, fullURL, nil)
125+
req, err := http.NewRequestWithContext(ctx, http.MethodGet, fullURL, nil) //nolint:gosec // G704: URL is from GitHub Actions ACTIONS_ID_TOKEN_REQUEST_URL env var
126126
if err != nil {
127127
return "", fmt.Errorf("failed to create request: %w", err)
128128
}
@@ -133,7 +133,7 @@ func (o *GitHubOIDCProvider) getOIDCTokenFromGitHub(ctx context.Context) (string
133133

134134
// Make the request
135135
client := &http.Client{}
136-
resp, err := client.Do(req)
136+
resp, err := client.Do(req) //nolint:gosec // G704: URL is from GitHub Actions env var
137137
if err != nil {
138138
return "", fmt.Errorf("failed to send request: %w", err)
139139
}

deploy/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/modelcontextprotocol/registry/deploy/infra
22

3-
go 1.25.8
3+
go 1.26
44

55
require (
66
github.com/pulumi/pulumi-gcp/sdk/v8 v8.41.1

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/modelcontextprotocol/registry
22

3-
go 1.25.8
3+
go 1.26
44

55
require (
66
cloud.google.com/go/kms v1.26.0

internal/api/handlers/v0/auth/oidc_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestOIDCHandler_ExchangeToken(t *testing.T) {
3131
token string
3232
expectedError bool
3333
}{
34-
{
34+
{ //nolint:gosec // G101: test data, not real credentials
3535
name: "successful token exchange with publish permissions",
3636
config: &config.Config{
3737
OIDCEnabled: true,

0 commit comments

Comments
 (0)