check: fail on Go module drift in root and bench modules#823
Draft
dkropachev wants to merge 1 commit intoscylladb:masterfrom
Draft
check: fail on Go module drift in root and bench modules#823dkropachev wants to merge 1 commit intoscylladb:masterfrom
dkropachev wants to merge 1 commit intoscylladb:masterfrom
Conversation
`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
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
Make
make checkfail when either Go module has drift.What changed
check-go-mod-drifttoMakefilego mod tidy -difffor the root modulego mod tidy -C tests/bench -difffor the bench moduleWhy
tests/benchis a separate Go module, butmake checkonly built and linted the root module. That allowed the bench module to drift until benchmark commands started failing withgo: updates to go.mod needed.Verification
make check-go-mod-driftmake checkNotes
tests/benchremains a separate module in this PR