Skip to content

check: fail on Go module drift in root and bench modules#823

Draft
dkropachev wants to merge 1 commit intoscylladb:masterfrom
dkropachev:dk/check-go-mod-drift-pr
Draft

check: fail on Go module drift in root and bench modules#823
dkropachev wants to merge 1 commit intoscylladb:masterfrom
dkropachev:dk/check-go-mod-drift-pr

Conversation

@dkropachev
Copy link
Copy Markdown
Collaborator

Summary

Make make check fail when either Go module has drift.

What changed

  • add check-go-mod-drift to Makefile
  • run go mod tidy -diff for the root module
  • run go mod tidy -C tests/bench -diff for the bench module
  • refresh tracked module files so the new guard passes immediately

Why

tests/bench is a separate Go module, but make check only built and linted the root module. That allowed the bench module to drift until benchmark commands started failing with go: updates to go.mod needed.

Verification

  • make check-go-mod-drift
  • make check

Notes

  • tests/bench remains a separate module in this PR
  • if another nested Go module is added later, the drift check should be extended to cover it too

`make check` did not verify that either the root module or the
bench module stayed tidy, which let `tests/bench` drift until
benchmark commands stopped working cleanly.

This adds an explicit drift check for both modules and refreshes the
tracked module files so the new guard passes immediately.

Constraint: `tests/bench` is a separate Go module and must be validated independently
Rejected: Check only the root module | would miss drift in `tests/bench`
Rejected: Fold tidy commands inline into `check` | hides intent and makes reuse harder
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If another nested Go module is added, extend `check-go-mod-drift` to cover it too
Tested: `make check-go-mod-drift`; `make check`
Not-tested: CI workflow execution on GitHub Actions
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.

1 participant