chore(infra): prune dotcom-deploy-assets-cache R2 bucket for closed PRs#8746
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
This should catch any multinode deploys we might do for previews.
MitjaBezensek
commented
May 11, 2026
| return preview.map((b) => b.name) | ||
| } | ||
| const ZERO_CACHE_APP_REGEX = /^pr-\d+-zero-cache$/ | ||
| const ZERO_CACHE_APP_REGEX = /^pr-\d+-zero-(cache|rm|vs)$/ |
Collaborator
Author
There was a problem hiding this comment.
Added this to catch both single as well as multinode previews.
# Conflicts: # .github/workflows/prune-preview-deploys.yml
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
multiplayer-template | 53bed7a | May 20 2026, 08:25 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
branching-chat-template | 53bed7a | Commit Preview URL Branch Preview URL |
May 20 2026, 08:26 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
tldraw-mcp-app | 53bed7a | May 20 2026, 08:24 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
agent-template | 53bed7a | May 20 2026, 08:26 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
image-pipeline-template | 53bed7a | Commit Preview URL Branch Preview URL |
May 20 2026, 08:25 AM |
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.
The
prune-preview-deploysworkflow already tears down preview workers, Supabase branches, fly.io zero-cache apps, and Zero litestream R2 backups, but it didn't touchdotcom-deploy-assets-cache— the R2 bucket wherecoalesceWithPreviousAssets(internal/scripts/deploy-dotcom.ts:957) writes a tarball per deploy. Closed PRs were leavingpr-<n>/folders behind forever.This PR adds a fifth prune pass over that bucket, reusing the existing closed-for-2-days filter via
processItems. Since both R2 prunes were near-duplicates, I refactored them into sharedlistR2PrPrefixes/deleteR2Prefixhelpers parameterized by anR2BucketRef({client, bucket, label}). Adding more buckets in future is one literal each. Net diff is +43/-80.staging/andproduction/prefixes are intentionally untouched — they're required bycoalesceWithPreviousAssetsfor rollback safety.Also broadens the fly.io app regex from
^pr-\d+-zero-cache$to^pr-\d+-zero-(cache|rm|vs)$so previewzero-rmandzero-vsapps get torn down alongsidezero-cache. Without this, the leftover apps kept writing new litestream backups into already-prunedpr-<n>/prefixes in the Zero R2 bucket, so the same prefix kept reappearing in nightly runs.Closes #8745.
Change type
otherTest plan
R2_ACCESS_KEY_ID/R2_ACCESS_KEY_SECRETsecrets the dotcom deploy job already uses for this bucket, so no new secrets needed.