Skip to content

feat(ci): re-benchmark a release via workflow_dispatch tag input - #253

Merged
momics merged 1 commit into
mainfrom
fix/bench-dispatch-tag
Jun 26, 2026
Merged

feat(ci): re-benchmark a release via workflow_dispatch tag input#253
momics merged 1 commit into
mainfrom
fix/bench-dispatch-tag

Conversation

@momics

@momics momics commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a workflow_dispatch tag input to the Benchmarks workflow so an existing release can be re-benchmarked on demand and its snapshot overwritten under bench-results/data/<tag>.

Faithful refresh (Option A): each bench job checks out the tag's own harness + library source (ref: ${{ inputs.tag || github.ref }}), while the workflow definition — including the archival step — runs from the dispatched ref (the default branch). That means the recent FETCH_HEAD archival fix and snapshot keying apply even when refreshing old tags.

Behavior

  • tag blank / normal tag-push: unchanged (main-<sha> or pushed-tag snapshot).
  • tag=vX.Y.Z: SNAPSHOT/COMMIT/REF resolve to that tag; results land in data/<tag>.
  • meta.commit now records the benchmarked commit (via a bench-rust job output), not the default-branch sha.

Usage

gh workflow run bench.yml -f tag=v0.6.0   # run from the default branch

Caveats

  • Tags whose harness scripts predate a path/command referenced by the current step orchestration may not run — expected for the faithful model.
  • Tags ≤ v0.5.2 are now archivable again (they previously hit the checkout bench-results pathspec bug), since archival runs from main.

YAML validated locally (yaml.safe_load).

Allows re-running benchmarks for an existing tag and overwriting its
snapshot under bench-results/data/<tag>. Faithful refresh: each bench job
checks out the tag's own harness + library (ref: inputs.tag), while the
archival step runs from the current workflow so the FETCH_HEAD fix and
snapshot keying apply to old tags too.

- workflow_dispatch.inputs.tag (blank = main snapshot, unchanged behavior)
- SNAPSHOT/COMMIT/REF resolve to the dispatched tag when present
- meta.commit now records the benchmarked commit, not the default branch

Dispatch from the default branch, e.g.: gh workflow run bench.yml -f tag=v0.6.0
@momics
momics merged commit 8c7a9c3 into main Jun 26, 2026
6 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.

1 participant