Repository navigation
fix(publish): keep images not yet moved to images/ in the registry - #37
Merged
Merged
Conversation
Uploads moved from templates/ to images/, but only templates rebuilt since then followed. `cf publish --r2` scanned images/ alone, so the 2026-09-21 upstream check rebuilt debian-13 and published a registry with nothing else in it; the other 15 images are still under templates/ and still download. Publish now also reads the legacy prefix. Newest-per-template selection lets a rebuild under images/ supersede its old copy, and unmoved images keep their original URLs. Prune still scans only the configured prefix, so it never touches the legacy objects the registry points at. Also stop three fallbacks defaulting to templates/, and document images/.
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.
Problem
The published registry lists only Debian 13.
35ed5d6moved uploads fromtemplates/toimages/, andcf publish --r2scanned only the configured prefix. On 2026-09-21 the upstream check rebuilt debian-13 underimages/and republished, which dropped the 15 images still undertemplates/. Those images are intact; every URL in the previous registry still returns 200.Fix
cf publish --r2also listsLEGACY_PREFIXES(templates/) viapublishPrefixes. The existing newest-per-template selection lets a rebuild underimages/supersede the legacy copy, and unmoved images keep their original URLs.R2_PREFIXfallbacks inenv.ts,publish.tsandmaintenance.tsdefault toimages/instead oftemplates/.docs/setup.mdanddocs/usage.mddescribeimages/and the legacy prefix.After merge
registry.json.templates/, 60 days), it will delete the legacy images around 2026-11-03 while the registry still points at them. Remove it or move it toimages/.Testing
publishPrefixesand legacy-supersession tests pass;bun run typecheckis clean.cf-cluster-templates, export post-processor,vmid_leased) fail identically onmainwithout this change.