fix: pin oapi-codegen version via go.mod tool directive#210
Merged
Conversation
|
Firetiger deploy monitoring skipped This PR didn't match the auto-monitor filter configured on your GitHub connection:
Reason: PR modifies build tooling and dependencies (go.mod, Makefile) but does not change kernel API endpoints or Temporal workflows. To monitor this PR anyway, reply with |
PR #201 inadvertently downgraded oapi-codegen from v2.6.0 to v2.5.1 because the Makefile used `go install @latest`. Pin the version using Go's tool directive in go.mod (same pattern as kernel/kernel) so that `go tool oapi-codegen` always uses the declared version. Also removes the patch_strict_optional_json post-processing script since v2.6.0 natively generates io.EOF handling and omitempty tags. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
196af8a to
d7632bf
Compare
ulziibay-kernel
approved these changes
Apr 10, 2026
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Summary
tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegendirective toserver/go.mod, pinning oapi-codegen at v2.6.0 via go.sumserver/Makefilefromgo install ...@latesttogo tool oapi-codegenso the pinned version is always usedOAPI_CODEGENbinary variable and install target from the Makefile (no longer needed)This is the root cause fix for the version regression in #201 (where
@latestresolved to v2.5.1 instead of v2.6.0). PR #209 already restored the generated code; this PR prevents it from happening again by adopting the samego.modtool directive pattern used inkernel/kernel.Test plan
go vet ./...passesgo test -raceon all non-e2e packages)go tool oapi-codegen -config ./oapi-codegen.yaml ./openapi-3.0.yamluses pinned v2.6.0🤖 Generated with Claude Code
Note
Low Risk
Low risk build tooling change: it only affects OpenAPI code generation and Go module dependency resolution, not runtime behavior. Main risk is unexpected dependency/tooling differences if the pinned tool or updated transitive deps behave differently across environments.
Overview
Pins
oapi-codegenfor reproducible OpenAPI generation.server/go.modnow declaresoapi-codegenas a Gotooldependency (and updates module sums), andserver/Makefileswitchesoapi-generatefrom installing@latestintobin/to invokinggo tool oapi-codegen.This removes the Makefile’s local
oapi-codegeninstall target/variable and updates Go module dependencies (including bumpinggithub.com/getkin/kin-openapitov0.133.0) to reflect the pinned toolchain.Reviewed by Cursor Bugbot for commit d7632bf. Bugbot is set up for automated code reviews on this repo. Configure here.