Skip to content

ci(bench): drop stale github-pages artifacts so a re-run can deploy - #1960

Merged
zackees merged 1 commit into
mainfrom
agent/pages-rerun-artifact
Nov 8, 2026
Merged

zackees merged 1 commit into
mainfrom
agent/pages-rerun-artifact

Conversation

@zackees

@zackees zackees commented Nov 8, 2026

Copy link
Copy Markdown
Member

Problem

Build Comparison Benchmark could not publish after any retry. A re-run uploads a second artifact named github-pages into the same workflow run, and actions/deploy-pages@v4 resolves the artifact by name across the whole run, not the current attempt (api-client.js -> artifactClient.listArtifacts()), aborting when the count is not 1:

Fetching artifact metadata for "github-pages" in this workflow run
Found 4 artifact(s)
##[error]Multiple artifacts named "github-pages" were unexpectedly found for this workflow run. Artifact count is 2.

Re-running is the routine cure for the transient release-asset 504s that kill the measure job, so this hit the two runs that were retried today: 42444946413 (attempts 1 and 2) and 42466790090 (attempt 2). Nothing was deployed from them, so the Pages site — which also serves the client-facing site/mirror/** manifest — went stale while the benchmark job burned ~2.5 h per attempt.

Fix

publish deletes any pre-existing github-pages artifact for this run immediately before actions/upload-pages-artifact, so a run always ends with exactly one:

  • new step Drop Pages artifacts uploaded by earlier attempts (list runs/{id}/artifacts, select(.name == "github-pages"), DELETE actions/artifacts/{id}; no-op on a first attempt);
  • publish gains actions: write for the delete;
  • GH_API_URL override (defaults to https://api.github.com) so the test can execute the script against a fake API.

The benchmark snapshot/log artifacts are explicitly not matched.

Tests

ci/test_benchmark_publish.py (already wired into ci-workflow-drift + ci/local_gate) gains 5 tests, including one that runs the real step script against a stdlib fake GitHub API seeded with run 42466790090's shape (two github-pages, plus site/log artifacts) and asserts only the two page artifacts are DELETEd.

$ uv run --no-project python -m unittest ci.test_benchmark_publish
Ran 12 tests in 1.285s
OK
$ uv run --no-project ruff check ci/test_benchmark_publish.py   -> All checks passed!
$ uv run --no-project python ci/check_python_complexity.py      -> All checks passed!

Red witness: with origin/main's workflow restored, the same module fails 4 failures, 1 error; green with the fix.

Live witness

Deleted the stale attempt-1 artifact (id 13612500409) from run 42466790090 and re-ran the failed deploy job: attempt 3 logged Found 3 artifact(s) -> Creating Pages deployment -> Reported success!, and the run is now success (13:52:55Z). That is the manual version of what this step automates.

Observation, not fixed here

In 42444946413 both attempts had publish succeed and deploy-pages report skipped 16 s after the upload — a second way to strand the site that no re-run repairs, since --failed does not re-run a skipped job. I could not reproduce or explain it from the logs in this pass; flagging it rather than guessing.

A re-run of Build Comparison Benchmark uploads a second artifact named
`github-pages`. actions/deploy-pages lists the artifacts of the whole RUN
(not the current attempt) and aborts when it finds two:

    ##[error]Error: Multiple artifacts named "github-pages" were
    unexpectedly found for this workflow run. Artifact count is 2.

Re-running is the routine cure for the transient release-asset 504s that
kill the measure job, so the deploy was stranded on every retry: runs
42444946413 (both attempts) and 42466790090 (attempt 2) never published,
taking the client-facing mirror manifest on Pages with them.

`publish` now deletes any pre-existing `github-pages` artifact for this run
right before `upload-pages-artifact`, so the run always ends with exactly
one. Requires `actions: write` on the job. GH_API_URL exists solely so the
test can point the script at a fake API and execute it.

Verified against run 42466790090: after deleting the attempt-1 artifact by
hand, a re-run of the deploy job logged `Found 3 artifact(s)` ->
`Creating Pages deployment` -> `Reported success!` and the run went green.
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@zackees
zackees added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit 3df078a Nov 8, 2026
29 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant