Skip to content

fix(sdk): unbreak sdk-verify after the Go 1.27 bump - #6645

Merged
reyortiz3 merged 1 commit into
stacklok:mainfrom
aron-muon:fix/sdk-verify-go-version
Sep 11, 2026
Merged

reyortiz3 merged 1 commit into
stacklok:mainfrom
aron-muon:fix/sdk-verify-go-version

Conversation

@aron-muon

Copy link
Copy Markdown
Contributor

Summary

Go SDK / Verify generated Go SDK is red on main (7e52ab9). Two leftovers from the Go 1.27 bump in #6639.

1. The job installs the wrong Go. setup-go reads sdk/go/go.mod (go 1.26.0), but sdk-verify runs generator tooling out of the root module (cmd/help/openapi-normalize, cmd/help/ogen-client-wrapper), which is now go 1.27. setup-go pins GOTOOLCHAIN=local, so it fails outright rather than upgrading:

go: go.mod requires go >= 1.27 (running go 1.26.0; GOTOOLCHAIN=local)

Pointed setup-go at the root go.mod. Deliberately not bumping sdk/go/go.mod - that's the published floor for SDK consumers, and there's no reason to raise it just so CI can run root tooling. Building the 1.26-floor SDK module with a 1.27 toolchain is fine, and sdk-test/sdk-lint still pass.

2. The committed SDK artifacts are stale. The bump also edited a BuilderImage doc comment ("golang:1.26-alpine" -> "golang:1.27-alpine"), which flows through docs/server/swagger.json into sdk/go/openapi.json, openapi.yaml and the generated client. So even on a correct toolchain, verify's diff fails:

-  "description": "... Examples: \"golang:1.27-alpine\", ...   (freshly generated)
+  "description": "... Examples: \"golang:1.26-alpine\", ...   (committed)

Regenerated with task sdk-generate. It's a one-line change in each of the three files.

Type of change

  • Bug fix

Test plan

  • Unit tests (task test)
  • Linting (task lint-fix)

Reproduced both on a clean checkout of main. Under Go 1.26 you get the toolchain error; under 1.27 you get the diff. With this change, on Go 1.27:

bash ./sdk/go/verify.sh   → rc=0
task sdk-test             → rc=0
task sdk-lint             → rc=0

I can't exercise the workflow's setup-go step locally, so that half is reasoned from the error rather than executed - worth a sanity check from someone who can re-run the job.

Does this introduce a user-facing change?

No. sdk/go/go.mod is untouched, so the SDK's minimum Go version for consumers is unchanged.

Two leftovers from stacklok#6639.

The workflow installs Go from sdk/go/go.mod (1.26.0), but sdk-verify
runs generator tooling out of the root module, which now needs 1.27.
setup-go pins GOTOOLCHAIN=local, so that fails outright instead of
upgrading:

  go: go.mod requires go >= 1.27 (running go 1.26.0; GOTOOLCHAIN=local)

Point setup-go at the root go.mod. The SDK module keeps its own lower
floor, so this doesn't raise the minimum for SDK consumers.

The committed SDK artifacts were also left stale: the bump edited a
BuilderImage doc comment ("golang:1.26-alpine" -> "golang:1.27-alpine")
which flows through swagger.json into openapi.json/yaml and the
generated client, so verify's diff fails even on a correct toolchain.
Regenerated with task sdk-generate.
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.91%. Comparing base (7e52ab9) to head (0c9da28).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6645      +/-   ##
==========================================
- Coverage   78.92%   78.91%   -0.01%     
==========================================
  Files         782      782              
  Lines       78053    78053              
==========================================
- Hits        61601    61599       -2     
- Misses      16447    16449       +2     
  Partials        5        5              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@reyortiz3
reyortiz3 merged commit 8b6ac6f into stacklok:main Sep 11, 2026
70 of 71 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 11, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants