Repository navigation
ci(release): publish a latest pointer per major version (TRUNK-23770) - #1310
Merged
Merged
Conversation
Promote now points channel-<major>.json at the version too, so each analytics-uploader major can follow its own line: @v2 reads channel-0.json and keeps getting 0.x backports after 1.0.0 is the latest release. channel.json and GitHub's latest move only when the version is the newest overall, so promoting a 0.17.x backport after 1.0.0 no longer moves either of them backwards. A pointer never moves back unless allow-downgrade is set, for a rollback. The script also fails when reading a pointer fails for any reason other than a missing object, instead of writing over it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
😎 Merged successfully - details. |
acatxnamedvirtue
requested review from
TylerJang27,
dfrankland and
max-trunk
November 11, 2026 17:49
TylerJang27
approved these changes
Nov 11, 2026
Contributor
Author
|
/trunk merge |
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.
Part of TRUNK-23770
Why
analytics-uploader
@v2has to keep installing the newest 0.x analytics-cli after 1.0.0 is promoted, and@v3has to follow 1.x. trunk.io has one mutable pointer today,channel.json, so an uploader major can't tell "the newest release" from "the newest release I support".There's also a bug coming: promoting a 0.17.x backport after 1.0.0 would move
channel.jsonand GitHub's "latest" flag backwards to the backport.What changes
set-latest-in-s3.shchannel-<major>.json({"latest": "<version>"}):channel-0.json,channel-1.json, and so on.ALLOW_DOWNGRADE=true. So a 0.17.x backport after 1.0.0 moves onlychannel-0.json.global_moved=true|falseto$GITHUB_OUTPUT.shopt -s inherit_errexit, an AccessDenied inside$(...)was logged, but the pointer was overwritten anyway and the script exited 0.promote_release.ymlallow-downgradeinput (defaultfalse) for a deliberate rollback.channel.jsonmoved. Otherwise the release is marked non-prerelease with--latest=false.mirror_release_to_s3.yml: step name only. It calls the same script, so it writes the per-major pointer too.CONTRIBUTING.md: the Promote step and the bucket layout describe both pointers.Consumers
channel.jsonkeeps its meaning, the newest release overall. ThetrunkCLI and the docs keep reading it.channel-<major>.json(feat: resolve latest from channel-0.json and never above 0.x (TRUNK-23254, TRUNK-23770) analytics-uploader#157). It falls back to a clampedchannel.json, so it's safe beforechannel-0.jsonexists.Testing
Ran the script against a fake
awsbacked by a temp directory, starting fromchannel.jsonat 0.17.0:0.17.0channel-0andchannel→ 0.17.01.0.0channel-1andchannel→ 1.0.00.17.1channel-0→ 0.17.1;channelstays 1.0.0;global_moved=false0.16.90.16.9,ALLOW_DOWNGRADE=true9.9.9(unpublished)0.17.10over0.17.9sort -V)trunk checkis clean.After merge
Re-run Promote Release for
0.17.0to seedchannel-0.json. Do this before analytics-uploader v2.1.8 ships, and before 1.0.0 is promoted.🤖 Generated with Claude Code