Skip to content

fix(scripts): preserve go client go.mod/go.sum across regeneration - #3540

Merged
nicoloboschi merged 1 commit into
vectorize-io:mainfrom
Sanderhoff-alt:fix/go-client-gomod-drift
Aug 19, 2026
Merged

fix(scripts): preserve go client go.mod/go.sum across regeneration#3540
nicoloboschi merged 1 commit into
vectorize-io:mainfrom
Sanderhoff-alt:fix/go-client-gomod-drift

Conversation

@Sanderhoff-alt

@Sanderhoff-alt Sanderhoff-alt commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • scripts/generate-clients.sh deleted the Go client's go.mod/go.sum before regeneration and re-resolved them with a fresh go mod tidy. Dependencies pulled in by the maintained test files (testify) are not pinned by the generator, so tidy resolved them to upstream's latest release.
  • As a result, every new testify release changed the regeneration output and broke the verify-generated-files check for all pull requests (currently happening with testify v1.12.0: recent PRs each had to commit the same go.mod/go.sum bump to get CI green).
  • Fix: treat go.mod/go.sum as maintained files — stash them alongside README.md/integration_test.go before wiping generated code and restore them over the generator-emitted ones. go mod tidy still runs, but now only adds entries for new imports; dependency upgrades become explicit go get + go mod tidy commits, same as any normal Go module.

Test plan

  • bash -n scripts/generate-clients.sh

Client regeneration deleted go.mod/go.sum and re-resolved them with
go mod tidy. Deps pulled in by the maintained tests (testify) are not
pinned by the generator, so tidy resolved them to upstream's latest
release. Every new testify release changed the regeneration output and
broke the verify-generated-files check for all pull requests.

Treat go.mod/go.sum as maintained files: stash them before wiping
generated code and restore them over the generator-emitted ones.
go mod tidy still runs but now only adds entries for new imports.
Dependency upgrades become explicit go get + go mod tidy commits.
@nicoloboschi
nicoloboschi merged commit 3b9261a into vectorize-io:main Aug 19, 2026
94 checks passed
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