Skip to content

Deploy when the artifact is listed, and wait for a cold edge - #297

Merged
reizuseharu merged 1 commit into
mainfrom
deploy-when-the-artifact-is-listed
Nov 26, 2026
Merged

reizuseharu merged 1 commit into
mainfrom
deploy-when-the-artifact-is-listed

Conversation

@reizuseharu

Copy link
Copy Markdown
Collaborator

Three deploys failed after #296, for two different reasons.

1. deploy-pages can't see the artifact yet — 2 failures (11-25 03:30, 14:15)

Error: No artifacts named "github-pages" were found for this workflow run.

The artifact existed (31 MB). In both runs it finished uploading the same
second
deploy-pages looked it up. This is
actions/deploy-pages#451:
the artifact listing can lag the upload by several seconds, and reports since
11-22 say it now fails "most of the time". The upstream fix
(#455) is unmerged;
v5.0.1 is still the latest release.

I called the first of these (11-21) a GitHub one-off in #296. It wasn't.

Fix: retry deploy-pages in the same job — up to 4 attempts, 10 / 30 / 60s
apart, the last failing the job as before. Not a fixed sleep (one reporter's
2s stopped working within two days), and not re-running the job, which uploads
a second artifact and then fails on finding two. Renovate merged the same
retry today (renovatebot/renovate#48395).
The environment URL and the smoke test take page_url from whichever attempt
deployed. A run whose first attempt works pays nothing.

2. The cold 503 outlasted #296's retries — 1 failure (11-22 22:45)

FAIL  /README.md could not be checked: still 503 after 5 tries

#296's own guard: README.md was still 503 after 5 tries 2s apart, so at least
15 seconds. Fix: wait as long as the script's other live checks do
(ATTEMPTS rounds, 10s apart, 90s by default), asking every unsettled path once
per round, so a down site fails in ~90s total rather than per path.

Verified

Against a local server playing the edge (ATTEMPTS=4):

Simulated edge Result Time
503 once, then 404 pass 10s
503 ×3, then 404 — longer than #296 allowed pass 30s
package.json served (200) fail "is published" 0s
503 forever fail "could not be checked", all 7 paths 30s

The retry path of deploy-pages can only be exercised by the bug itself, so it
is verified by structure (matching Renovate's) and will be confirmed by the next
deploy that hits the race.

Workflow rules

Actions already latest, looked up live: checkout@v7 (v7.0.1),
configure-pages@v6 (v6.0.0), upload-pages-artifact@v5 (v5.0.0),
deploy-pages@v5 (v5.0.1). Steps are dependent — nothing to run in parallel.
ubuntu-latest, correct for a public repo.

🤖 Generated with Claude Code

Three deploys since #296 failed, for two reasons.

Two of them, both on 25 November, failed in deploy-pages: "No artifacts named
github-pages were found for this workflow run". The artifact was there, 31MB,
uploaded the same second deploy-pages went looking for it. deploy-pages finds
the artifact by listing the run's, and that listing can lag the upload by
several seconds. It is actions/deploy-pages#451 for everybody who uploads and
deploys in one job, much worse since 22 November; I wrote off the first of
these, on the 21st, as a one-off, and it was not.

So deploy-pages is asked up to four times, ten, thirty and sixty seconds
apart, the first three allowed to fail and the last failing the job as
before. Not a fixed sleep -- one reporter's two seconds stopped being enough
in two days -- and not a re-run of the job, which uploads a second artifact
and then fails on finding two. Renovate merged the same retry today for the
same bug. The environment URL and the smoke test take the page URL from
whichever attempt deployed. A run whose first ask works pays nothing.

The third, on 22 November, was #296's own guard: README.md still answered 503
after five tries two seconds apart -- at least fifteen seconds. The check now
waits as long as the script's other checks do, ATTEMPTS rounds ten seconds
apart, and asks every unsettled path once a round, so a site that is down
fails in that time and not in seven times it.

Against a local server playing the edge, with four rounds: a 503 once, then
404, passes in 10s; three 503s, then 404 -- longer than #296 waited -- passes
in 30s; a file actually served fails at once; a 503 that never clears fails
in 30s, all seven paths together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@reizuseharu reizuseharu added the bug Something isn't working label Nov 26, 2026
@reizuseharu
reizuseharu merged commit 5317992 into main Nov 26, 2026
3 checks passed
@reizuseharu
reizuseharu deleted the deploy-when-the-artifact-is-listed branch November 26, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants