You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(ENG-15913): add a release channel for each major version - #627
Release channels let users stay on one major version of the CLI. A release channel is a name that points at the highest release in a group. For example, the Docker Hub tag 1 points at the highest 1.x release.
This PR adds a channel for each major version, and stops an older release from moving a channel back. #629 builds on this PR to keep cloudsmith update in the running major version.
Release 1.40.2 when 1.40.1 is the highest release
publish-binaries pushes each install manifest under two names: cloudsmith-cli-manifest-<target>, as today, and the new cloudsmith-cli-v1-manifest-<target>. Cloudsmith resolves versions/latest of each name by semantic version, so the v1 name always gives the highest 1.x release.
publish-containers pushes only cloudsmith/cloudsmith-cli:1.40.2. Today it also moves latest, 1, and 1.40.
publish-github publishes the v1.40.2 release, but doesn't mark it as the GitHub Latest release.
promote-channels finds that 1.40.2 is the highest release overall, in 1.x, and in 1.40.x. It marks v1.40.2 as Latest, and points the Docker Hub tags latest, 1, and 1.40 at 1.40.2.
notify-downstream-repos sends the release event to the Homebrew tap, the GitHub Action, and three new repositories: cloudsmith-ado-integration, orb, and cloudsmith-sbx-kits. Each repository opens a pull request that bumps its CLI version to 1.40.2.
Release 2.0.0, then 1.40.3
2.0.0:promote-channels marks v2.0.0 as Latest, and points latest, 2, and 2.0 at 2.0.0. The first cloudsmith-cli-v2-manifest-<target> manifests appear.
1.40.3:promote-channels points 1 and 1.40 at 1.40.3. latest and Latest stay on 2.0.0. Without this PR, 1.40.3 moves latest back to 1.40.3.
Re-run an old release
After 1.40.3 ships, re-run the v1.40.2 release. promote-channels moves nothing, because 1.40.3 holds 1 and 1.40. Without this PR, the re-run moves every channel back to 1.40.2.
The same check covers a failed release. If 1.40.3 fails, 2.0.0 ships, and then you re-run 1.40.3, latest stays on 2.0.0. promote-channels reads the published releases when it runs, not when the release starts.
Release 2.0.0 and 1.40.3 at the same time
promote-channels runs for one release at a time, because all release tags share one concurrency group. Each run reads the published releases just before it moves a channel.
Without the group, 1.40.3 can read the releases before 2.0.0 is published, decide that it holds latest, and then push after 2.0.0. The queue: max setting keeps a waiting run. Without it, a new pending run cancels the waiting one.
Other changes
.github/scripts/promote_channels.py decides which channels to move, and moves them. Its header has the same examples. It runs with uv run. Its only dependency, requests, is declared in the script header.
A tag that isn't MAJOR.MINOR.PATCH fails promote-channels.
.github/scripts is exempt from the ruff rule that bans a module-level import requests. The rule keeps CLI startup fast, and the CI scripts aren't part of the CLI.
The Docker Hub repository name comes from vars.DOCKERHUB_REPOSITORY. The default is cloudsmith/cloudsmith-cli. A scratch repository can set its own name to test the release flow.
Token:notify-downstream-repos sends the release event with CLOUDSMITH_BOT_TOKEN. cloudsmith-bot has write access to the three new downstream repositories.
Against the real cloudsmith-cli releases, the channel check gives the same result as the earlier shell version for 9 versions.
Against a fake API with three pages, a draft, and a tag that isn't a release, the channel check gives the same result for 7 versions.
Against a fake API and a fake docker:
With v1.40.1 and v2.0.0 published, v2.0.0 becomes Latest and moves latest, 2, and 2.0.
v1.40.2 then moves only 1 and 1.40.
A re-run of v1.40.1 moves nothing.
Still to do before this PR leaves draft
Run publish-github and promote-channels in a private scratch repository, with the same script and concurrency settings. Push v1.40.0, v2.0.0, v1.40.1, and v1.40.2 close together. Check that every waiting run completes, that Latest ends on v2.0.0, and that v1.40.2 moves 1 and 1.40 but not latest. Add the run links here.
Run the full release flow in a scratch repository with the tags 1.40.0, 2.0.0, and 1.40.1. Check the manifests and the pinned Docker Hub tags. PyPI trusted publishing is bound to this repository, so publish-github and promote-channels don't run there. The test above covers them.
Each release also pushes its install manifest as
cloudsmith-cli-v<MAJOR>-manifest-<target>. The update check and
`cloudsmith update` stay in the running major version, and suggest a
higher major version without installing it. The upgrade commands for
pip, pipx, uv and Docker stay in the running major version.
The Docker Hub floating tags and the GitHub "Latest" release move only
for the highest release in their channel. A pre-release moves no
channel and sends no downstream event. The downstream event now also
goes to cloudsmith-ado-integration, orb and cloudsmith-sbx-kits.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds per-major release channels so CLI updates stay within the installed major version while notifying users about newer majors and their release notes.
Changes:
Publishes per-major manifests and gates floating release channels and downstream notifications.
The promote-channels job moves the Docker Hub floating tags and the
GitHub "Latest" release after publish-github. All release tags share
its concurrency group, so an older release that finishes last cannot
move a channel back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Release channels and Docker tags can remain stale because higher tags block promotion even when publication fails, and the shared concurrency lock can discard pending promotions.
Failed higher-version tags can block promotion of published releases
.github/scripts/release-channels.sh:11
A higher tag can block promotion even if that release never publishes successfully. For example, if v1.40.2 is tagged while 1.40.1 finishes publishing and the 1.40.2 build fails, all three 1.40.1 channels are skipped and remain on an older release. Compare published, non-draft, non-prerelease releases instead of tags, retaining VERSION as a candidate.
The release-channels concurrency group uses queue: max, so a new
release does not cancel a waiting promotion. The channel script reads
the published releases, so a tag whose release failed does not stop a
lower release from moving its channels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Cross-release serialization and GitHub/Docker Hub channel promotion require end-to-end validation of overlapping releases and failed-job reruns, which the described scratch setup and review environment cannot verify.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Linked end-to-end results are still needed to verify concurrent-release serialization, coordinated GitHub/Docker Hub promotion, and downstream repository token access.
Replace release-channels.sh with release_channels.py. The script keeps
its inline metadata in the file header, and uv runs it. It gives the
same output as the shell script.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
release_channels.py reads the releases with requests, not the gh CLI.
The new promote_channels.py moves the GitHub "Latest" release and the
Docker Hub floating tags, so the workflow keeps no large shell block.
The script header gives examples of why a channel moves only for the
highest release.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CLI has no release candidates, so the release workflow does not
need a pre-release path. A tag that is not MAJOR.MINOR.PATCH now fails
promote-channels. promote_channels.py now also holds the channel check,
because the validate job no longer runs it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* origin/master:
feat(ENG-15913): add a release channel for each major version (#627)
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
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.
Description
Release channels let users stay on one major version of the CLI. A release channel is a name that points at the highest release in a group. For example, the Docker Hub tag
1points at the highest 1.x release.This PR adds a channel for each major version, and stops an older release from moving a channel back. #629 builds on this PR to keep
cloudsmith updatein the running major version.Release 1.40.2 when 1.40.1 is the highest release
publish-binariespushes each install manifest under two names:cloudsmith-cli-manifest-<target>, as today, and the newcloudsmith-cli-v1-manifest-<target>. Cloudsmith resolvesversions/latestof each name by semantic version, so thev1name always gives the highest 1.x release.publish-containerspushes onlycloudsmith/cloudsmith-cli:1.40.2. Today it also moveslatest,1, and1.40.publish-githubpublishes the v1.40.2 release, but doesn't mark it as the GitHub Latest release.promote-channelsfinds that 1.40.2 is the highest release overall, in 1.x, and in 1.40.x. It marks v1.40.2 as Latest, and points the Docker Hub tagslatest,1, and1.40at 1.40.2.notify-downstream-repossends the release event to the Homebrew tap, the GitHub Action, and three new repositories:cloudsmith-ado-integration,orb, andcloudsmith-sbx-kits. Each repository opens a pull request that bumps its CLI version to 1.40.2.Release 2.0.0, then 1.40.3
promote-channelsmarks v2.0.0 as Latest, and pointslatest,2, and2.0at 2.0.0. The firstcloudsmith-cli-v2-manifest-<target>manifests appear.promote-channelspoints1and1.40at 1.40.3.latestand Latest stay on 2.0.0. Without this PR, 1.40.3 moveslatestback to 1.40.3.Re-run an old release
After 1.40.3 ships, re-run the v1.40.2 release.
promote-channelsmoves nothing, because 1.40.3 holds1and1.40. Without this PR, the re-run moves every channel back to 1.40.2.The same check covers a failed release. If 1.40.3 fails, 2.0.0 ships, and then you re-run 1.40.3,
lateststays on 2.0.0.promote-channelsreads the published releases when it runs, not when the release starts.Release 2.0.0 and 1.40.3 at the same time
promote-channelsruns for one release at a time, because all release tags share one concurrency group. Each run reads the published releases just before it moves a channel.Without the group, 1.40.3 can read the releases before 2.0.0 is published, decide that it holds
latest, and then push after 2.0.0. Thequeue: maxsetting keeps a waiting run. Without it, a new pending run cancels the waiting one.Other changes
.github/scripts/promote_channels.pydecides which channels to move, and moves them. Its header has the same examples. It runs withuv run. Its only dependency,requests, is declared in the script header.MAJOR.MINOR.PATCHfailspromote-channels..github/scriptsis exempt from the ruff rule that bans a module-levelimport requests. The rule keeps CLI startup fast, and the CI scripts aren't part of the CLI.vars.DOCKERHUB_REPOSITORY. The default iscloudsmith/cloudsmith-cli. A scratch repository can set its own name to test the release flow.Type of Change
Additional Notes
ENG-15913.
notify-downstream-repossends the release event withCLOUDSMITH_BOT_TOKEN. cloudsmith-bot has write access to the three new downstream repositories.Testing
docker:latest,2, and2.0.1and1.40.Still to do before this PR leaves draft
publish-githubandpromote-channelsin a private scratch repository, with the same script and concurrency settings. Push v1.40.0, v2.0.0, v1.40.1, and v1.40.2 close together. Check that every waiting run completes, that Latest ends on v2.0.0, and that v1.40.2 moves1and1.40but notlatest. Add the run links here.publish-githubandpromote-channelsdon't run there. The test above covers them.🤖 Generated with Claude Code