-
Notifications
You must be signed in to change notification settings - Fork 2
feat(cargo-anvil): benchmark regression detection via cargo-bench-history #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
aaf64c3
3ac9a23
222e3c9
36a74ab
b5f208b
96e7135
eb0dd16
6871c23
f18f4e7
efedf1e
2d73e3a
f61b558
2a883f4
d870aca
2237b07
b7322c0
e43fd78
418dac9
751d1f7
edd5fae
5225d8f
884152e
d9b9519
e397a46
aa856be
a3b4973
4837202
5deed42
1e97e48
7870c57
14921d9
75974da
afe9a9a
0c8e47c
cbd9b9f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,14 @@ on: | |
| description: Runner label for aarch64 Windows jobs. | ||
| type: string | ||
| default: windows-11-arm | ||
| bench_machine_key: | ||
| description: | | ||
| Machine key the benchmark history is partitioned by. Leave empty to | ||
| use cargo-bench-history's hardware fingerprint. Set a stable pool | ||
| label when the runner pool is heterogeneous enough to fragment a | ||
| series into partitions too sparse to analyze. | ||
| type: string | ||
| default: "" | ||
|
martin-kolinek marked this conversation as resolved.
|
||
| secrets: | ||
| CODECOV_TOKEN: | ||
| description: | | ||
|
|
@@ -141,13 +149,43 @@ jobs: | |
| with: | ||
| group: scheduled-exhaustive | ||
|
|
||
| scheduled-benchmarks: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [linux, windows] | ||
| runs-on: ${{ matrix.os == 'linux' && inputs.linux_runner || inputs.windows_runner }} | ||
| permissions: | ||
| contents: read | ||
| # Restoring the history walks the Actions runs/artifacts API. An action | ||
| # cannot request permissions, so this has to be granted here. | ||
| actions: read | ||
|
Comment on lines
+159
to
+162
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Copilot speaking] Align the permission summary with benchmark restorationThe reusable workflow says that after resetting ordinary jobs to Reproducible reasoning: The file-level comment describes the permission model for the whole reusable workflow. The benchmark job now adds Consequence: A security or maintenance review that relies on the summary can overlook an Actions API capability that must be preserved for benchmark restoration. Recommended action: Make the high-level summary and the workflow permission model agree. If Actions API restoration remains, describe the reset as followed by capability-specific job grants, including References:
Impacted locations:
|
||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| # The analysis orders each series by first-parent commit topology | ||
| # and locates the merge-base, so it needs the whole commit graph. | ||
| # The checkout has already happened by the time an action runs, so | ||
| # this too has to be set here. | ||
| fetch-depth: 0 | ||
| lfs: true | ||
| - uses: ./.github/actions/anvil-run-group | ||
| with: | ||
| group: scheduled-benchmarks | ||
| bench_history: true | ||
| # Per-leg identity: the matrix value is in scope here and nowhere | ||
| # inside the action. | ||
| bench_artifact: bench-history-${{ matrix.os }} | ||
| bench_machine_key: ${{ inputs.bench_machine_key }} | ||
|
|
||
| publish-failure: | ||
| name: Publish scheduled failure | ||
| needs: | ||
| - scheduled-test | ||
| - scheduled-advisories | ||
| - scheduled-runtime-analysis | ||
| - scheduled-exhaustive | ||
| - scheduled-benchmarks | ||
| if: ${{ always() && vars.ANVIL_PUBLISH_FAILURE_ISSUE != 'false' | ||
| && contains(needs.*.result, 'failure') }} | ||
| runs-on: ${{ inputs.linux_runner }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Copilot speaking]
Align the durable-store claim with implemented support
The pull request description says the CI-artifact rolling window has an opt-in durable Azure Blob option for longer history. The reviewed GitHub and Azure DevOps workflows only restore and republish
target/anvil/bench-historythrough CI-native artifacts, while the benchmark design says durablecargo-bench-historybackends such as Azure Blob are outsidecargo-anvil's supported scope.Reproducible reasoning: The GitHub action uploads the local directory as an Actions artifact. Azure DevOps restores and publishes the same directory as a pipeline artifact. No reviewed surface selects an Azure Blob backend or supplies its endpoint, credentials, restore, or publication behavior. That implementation matches the design's explicit exclusion but not the pull request description's substantive capability claim.
Consequence: Reviewers and adopters can plan around a supported long-retention option that the generated workflows cannot configure, then lose history when CI artifact retention expires.
Recommended action: Reconcile the pull request description, benchmark design, and generated workflows without assuming which side is authoritative. Either describe CI-native artifacts as the only supported store in this change, or add and validate the claimed durable backend with explicit configuration, credential handling, documentation, and equivalent behavior on both workflow backends.
References:
Impacted locations:
.github/actions/anvil-run-group/action.yml:214-221crates/cargo-anvil/docs/design/benchmarks.md:88-111crates/cargo-anvil/docs/design/benchmarks.md:188-193crates/cargo-anvil/docs/design/ado.md:940-963crates/cargo-anvil/templates/justfiles/anvil/checks/bench-history.justcrates/cargo-anvil/tests/snapshots/snapshots__ado_backend.snap:617-630crates/cargo-anvil/tests/snapshots/snapshots__ado_backend.snap:732-909crates/cargo-anvil/templates/ado/scheduled-stages.yml:127-140