Repository navigation
feat(desktop): mirror each release to a stable bucket prefix - #270
Merged
Merged
Conversation
A download link had to name /codev/<version>/<file>, so every link written down anywhere — docs, an email, a chat message — died at the next release. stage-release now also copies each installer to /codev/latest/<file>. Both sides are already in the bucket, so mc does a server-side copy: the mirror costs storage, not a second upload of ~1.8GB. Blockmaps are skipped, since they only mean anything beside the artifact a manifest names, which is the versioned copy. Nothing reads the prefix. The manifests still name <version>/ and that is all an installed build resolves, so this cannot affect auto-update. Also stops uploading every artifact once per channel file. The loop uploaded a whole version folder for each manifest, and every manifest of a release carries the same version — so a four-channel release uploaded each artifact four times. Deduping the versions first makes it once. Co-Authored-By: Claude Opus 5 (1M context) <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.
A download link had to name
/codev/<version>/<file>, so any link written down anywhere — the docs, an email, a chat message — died at the next release.stage-release.tsnow also copies each installer to/codev/latest/<file>.How
Both sides are already in the bucket, so
mcissues a server-side copy: the mirror costs storage, not a second upload of ~1.8 GB. Ordering is artifacts → mirror → manifests, preserving the existing "manifests last" rule.Blockmaps are skipped. They only mean anything beside the artifact a manifest names, and manifests name
<version>/.This cannot affect auto-update. Nothing reads the prefix — the manifests still name
<version>/, which is all an installed build ever resolves. It exists purely so a human-facing link keeps working.Also: stops uploading everything four times
Not a new problem, but it compounds with adding more copy operations, so it's fixed here. The upload loop ran per manifest and uploaded the version folder whole:
Every channel file of a release carries the same version, so a two-channel Linux release uploaded each artifact twice and a full four-channel release would upload each one four times. This is observable in the current output — the Linux release staged yesterday printed all eight
mc cplines twice. Deduping the versions into aSetfirst makes it once.Verified
No unit test: the script's payload is
mcinvocations, and testing that would mean mocking$, which the repo's testing guidance rules out. Instead it was run end to end on a synthetic release — two channel files, three artifacts each, two blockmaps — withCODEV_UPDATE_TARGETunset so it prints rather than uploads:1.18.4-9/(6 artifacts + 2 blockmaps), each exactly oncelatest/, blockmaps correctly absentbun typecheckclean.Scope notes
DIVERGENCES.mdrow:scripts/stage-release.tsis a fork-only file, which the divergence policy excludes, and the new layout is documented in the script's own header.CHANGELOG.mdentry: nothing about the app changes. This is release tooling and bucket layout.latest/folder sits beside thelatest*.ymlfiles, which is a little confusable on a listing. Kept anyway because it is the name a download link is expected to have;STABLE_PREFIXis a one-line change if you'd rather it werecurrent/.latest/from the previous one. Worth anmc mirror --removeif the target list ever changes.Follow-up, not included
The docs page resolves downloads through a redirect route (landing-page #114) rather than these URLs, so it needs no change. This makes the bucket URL stable too, for links outside the docs site.
🤖 Generated with Claude Code