Repository navigation
ci: run benchstat as a tool of the bench module - #136
Merged
Merged
Conversation
wfaudit v0.196.0 (go-run-version) flags the A/B workflow's `go run golang.org/x/perf/cmd/benchstat@latest`: a versioned go run loads the deprecation status of the module's newest release from sum.golang.org, the failure #135 removed from the coverage step. It also floated with every x/perf commit. Declare benchstat with a `tool` directive in bench/go.mod, pinned by go.sum, and run it with `go tool` from bench. The ci.yml comment from #135 is reworded: wfaudit read its literal example as a command (reported to the fleettools owner). `wfaudit --fail .` now reports 0 MEDIUM. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first dispatch of the A/B workflow (run 46267040621) failed in Compare: "go: go.mod requires go >= 1.27.3 (running go 1.27.2; GOTOOLCHAIN=local)". setup-go read the root go.mod (1.27.2), while benchstat now runs as a tool of the bench module, whose go line is 1.27.3. Read the version from bench/go.mod; it also builds the root module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
wfauditv0.196.0 has a new rule, go-run-version, and it flags the A/B workflow'sgo run golang.org/x/perf/cmd/benchstat@latest. A versionedgo runloads the deprecation status of the module's newest release from sum.golang.org. That is the same failure that broke the coverage step before #135.@latestalso meant the tool changed with every x/perf commit.What
bench/go.modgainstool golang.org/x/perf/cmd/benchstat, pinned by go.sum (x/perf at 4febdb082b2c). Tidying the module also moved the bench module'sx/systo v0.50.0; the library's go.mod is untouched..github/workflows/bench.yml: the Compare step runs(cd bench && go tool benchstat "$RUNNER_TEMP/base.txt" "$RUNNER_TEMP/head.txt"). The job already checks out the repository..github/workflows/ci.yml: the comment added in ci: run covblocks as a tool of the bench module #135 is reworded. wfaudit read the literal example in it as a command; that false positive has been reported to the owner of fleettools.Checked locally
go tool benchstat -hfrombenchruns the pinned binary.go build ./...andgo vet ./...inbenchpass, andactionlintpasses on bench.yml.wfaudit --fail .reports 0 HIGH, 0 MEDIUM, 0 INFO.The A/B workflow runs only on
workflow_dispatch, so this PR's CI does not exercise the Compare step; its first dispatch will.Refs #135
🤖 Generated with Claude Code