Repository navigation
Deploy when the artifact is listed, and wait for a cold edge - #297
Merged
Merged
Conversation
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>
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.
Three deploys failed after #296, for two different reasons.
1.
deploy-pagescan't see the artifact yet — 2 failures (11-25 03:30, 14:15)The artifact existed (31 MB). In both runs it finished uploading the same
second
deploy-pageslooked it up. This isactions/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-pagesin the same job — up to 4 attempts, 10 / 30 / 60sapart, the last failing the job as before. Not a fixed
sleep(one reporter's2s 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_urlfrom whichever attemptdeployed. A run whose first attempt works pays nothing.
2. The cold 503 outlasted #296's retries — 1 failure (11-22 22:45)
#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
(
ATTEMPTSrounds, 10s apart, 90s by default), asking every unsettled path onceper round, so a down site fails in ~90s total rather than per path.
Verified
Against a local server playing the edge (
ATTEMPTS=4):package.jsonserved (200)The retry path of
deploy-pagescan only be exercised by the bug itself, so itis 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