Repository navigation
feat(gh-pages): Wait for the Pages build and retry when it fails - #961
Merged
Merged
Conversation
A push to the Pages branch only starts the build, so a failed build went unnoticed (#960). Wait for the build of the pushed commit, request up to 2 rebuilds, then fail the target. Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
Contributor
|
BYK
approved these changes
Nov 5, 2026
8 tasks done
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.
Closes #960.
The
gh-pagestarget only pushed to the branch and reported success. GitHub builds and deploys Pages afterwards, so when that failed (sentry-python 2.74.0:actions/deploy-pagestimed out atupdating_pages), the publish went green while the docs stayed stale.After the push, the target now waits for GitHub Pages to build the pushed commit, polling
GET /repos/{o}/{r}/pages/builds/latestevery 10s for up to 15 min. If the build errors or times out, it callsPOST /repos/{o}/{r}/pages/buildsand waits again, at most 2 times, and then fails the target with the build error and a link to thegithub-pagesdeployments. Because completed targets stay checked on the publish issue, re-addingacceptedretries only gh-pages.The wait is skipped, with a log line, in these cases:
GET /repos/{o}/{r}/pagesreturns 403/404 (Pages is off, or the token has no Pages permission). This logs a warning, and the target still succeeds.legacybuild from the configured branch, for example when it builds from a custom Actions workflow.request*methods as mutating, so this skip also keepsrequestPagesBuildout of dry-run.Unverified: I haven't checked whether the
sentry-release-bottoken used by getsentry/publish has Pages read/write. Without read, the 403/404 fallback above keeps releases working, but there's no wait. With read but no write, a failed build fails the target when the rebuild request is rejected. That failure is real, and it would surface on the publish issue.Worst case, the target now holds the publish job for about 45 min (3 attempts × 15 min).
via @BYK.
--
View Session [Sentry]