Repository navigation
Start benchmark history from the CI run that published a release - #494
Merged
Merged
Conversation
benchmark-history.yml triggered on `release: published`, but the shared pipeline publishes releases with GITHUB_TOKEN, and events caused by GITHUB_TOKEN start no workflow runs. The workflow has never run on a release, and the histories stopped at 5.3.x. It now triggers on `workflow_run` of CI on main. A new resolve job takes the newest published release and passes its tag on only when it was published after that CI run started and the history does not already have that version. The measure job runs for that tag, or for a dispatch, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW2sHrLz9iC1cJzLLZy
…runs SonarCloud flagged the workflow_run checkouts (S7631) and the workflow-level contents: write (S8233). The workflow now defaults to contents: read, and only the measure job asks for write. Resolve ignores CI runs whose head repository is a fork, since a fork's branch can also be called main. Both checkouts drop the event-derived ref, and measure runs only when github.ref is the default branch, which is where it pushes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW2sHrLz9iC1cJzLLZy
|
3 tasks
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.



Fixes #320
Why it never ran
benchmark-history.ymltriggered onrelease: published. The shared pipeline publishes releases withGITHUB_TOKEN, and an event caused byGITHUB_TOKENstarts no workflow run, so the trigger has never fired and the histories stopped at 5.3.x.What changed
workflow_runofCI,types: [completed],branches: [main]. That event does fire, because a push to main started the CI run, notGITHUB_TOKEN. This is the third option in the acceptance criteria. It needs no change to the shared pipeline inktsu-dev/.github, which doesn't expose the release job's outputs to the caller.resolvejob (only for a successful CI run): it reads the newest non-draft release and passes its tag on only when both of these hold:docs/benchmarks/history.jsondoesn't already have that version, so a re-run of CI or an earlier dispatch can't add a second point.measurenowneeds: resolve. It runs for that tag, or for aworkflow_dispatch(withalways(), becauseresolveis skipped on a dispatch). The "Measure the released version" step readsneeds.resolve.outputs.taginstead ofgithub.event.release.tag_name. The backfill path is unchanged.workflow_run, so nobody "simplifies" it back torelease.Verification
The YAML parses. The
on:keys are nowworkflow_runandworkflow_dispatch, andmeasurehasneeds: resolve.I ran the resolve script as written, with a stubbed
gh, against four cases:tag=v5.13.0history.json(5.3.2)Not run locally: actionlint and a real
workflow_runevent. Neither can run outside Actions. The first CI run on main that releases after this merges will exercise the path.Still needed after merge
Acceptance item 2, backfilling 5.4–5.8.x into all three histories, takes one manual dispatch of Benchmark History with the missing versions in
versions. This PR doesn't do that run.Generated by Claude Code