Repository navigation
ci(pages): publish the site when the benchmark fails (#1825) - #1854
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 2, 2026
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 item 1 of #1825 (follow-up from the #1815 review).
Problem
site/mirror/**reaches GitHub Pages only throughbenchmark-build-comparison.yml,and the
publishjob was gated onneeds.benchmark.result == 'success'. Abroken/slow ESP32-S3 benchmark therefore froze every mirror update — even though
the mirror has nothing to do with the measurement.
Why not "a second, independent publisher"
Pages deploys replace the entire site, so two publishers would clobber each
other (mirror-only deploy would drop the benchmark report, and vice versa). The
site stays assembled by exactly one job; the fix makes that job tolerant of a
missing measurement instead of dependent on one.
Change
publishnow runs whenever the benchmark job is finished, not when itsucceeded (
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}), and:benchmark-statsbranch(
ls-remote→fetch --depth=1→reset --hard FETCH_HEAD), soindex.html/
latest.jsonsurvive a failed benchmark;needs.benchmark.result == 'success'(the download step is now conditional);repo/site/mirror/, so the workflow copy winsover the mirror snapshot inside the benchmark artifact;
(
git diff --cached --quiet), so a no-op run never rewrites history.deploy-pageskeepsneeds: publishand now says so explicitly(
if: needs.publish.result == 'success'). Trigger paths,ci.tomlcontract,concurrency, and the benchmark job itself are untouched.
Tests
New
ci/test_benchmark_publish.py(7 tests) asserts the wiring: noresult == 'success'on the publish gate, artifact download conditional, last-goodseeding ordered before the mirror copy, single assembler,
deploy-pagesneedsonly
publish, and no-op publish cannot push. Registered in.github/workflows/ci-workflow-drift.ymlandci/local_gate.py(a guard nothingruns is decorative).
E2E of the exact
run:block against a local bare repo (scratch/mirror-deploy-e2e/run_e2e.py,no network), 3 scenarios:
index.html,latest.json,mirror/manifest.json; the workflow's mirror copy wins over the artifact's.branch advanced (
d7c1fa5..280a60d) — this is the case that used to freeze the site.No site changes to publish., branch sha unchanged (2 commits total).No Rust changed, so
bash testwas not run.Shadow-mode note: this only removes the cross-failure coupling; nothing about the
benchmark itself, board coverage, or trust of the measurements changes.