Repository navigation
Conversation
why: A website preview can finish uploading after its pull request closes. The cleanup and upload jobs need tests for both orders of events. what: - Run the workflow commands against a local GitHub API and S3 fixtures. - Cover reopen, late upload, permission denial and historical cleanup.
why: GitHub rejected the close workflow before it could remove a merged preview. An upload already in progress could recreate the closed page. what: - Discover closed previews with an hourly check of recent and older PRs. - Recheck each PR in its upload queue before deleting its preview. - Require the current open PR and its tested merge before uploading.
This branch has not been deployed
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.
Website PR #383 kept serving its preview after it merged. GitHub rejected the close workflow before it assigned a runner, and the upload was already in progress. This change gives the website another opportunity to remove a closed preview, including one recreated by an old upload. Issue #403.
The hourly check looks at recent closures and a rotating page of older PRs. It probes up to 28 exact preview folders and queues cleanup for the ones that contain files. Each cleanup shares the PR’s upload queue and checks that the PR is still closed immediately before deleting its folder. The website publisher also checks that a retry still belongs to the current open PR and its tested merge.
Verification
queue: maxsetting. The remaining cleanup workflow checks passed with that diagnostic excluded. GitHub concurrency settings.The earlier close workflow removed PR 352’s preview after its upload finished. This repository has yet to run a scheduled cleanup. Keep #403 open until the schedule can read the preview folder, a closed page returns 404 after its cache expires, and the reopened PR gets its preview back when an upload was already in progress. Earlier cleanup.
The separate one-time check will use the scheduled cleanup role to look for one object under the closed
pr-383/prefix. Its local tests passed. The live permission check is pending. One-folder check #405.