Repository navigation
fix(cube-cli): Install the newest release that ships this platform's binary - #12435
Conversation
…binary The installers downloaded from releases/latest, and `cube update` and the background update check read /releases/latest. When the latest release is missing a platform's binary — v1.7.14 shipped without aarch64-apple-darwin after a failed upload, and every release has a window between publishing and its uploads finishing — installs and updates on that platform failed. All three now list recent releases and pick the highest stable version that lists the platform's asset. Maintenance releases of older lines are interleaved by publish date, so the pick is by version, not position. The installers try up to three candidates if a download fails, and fall back to releases/latest if the API is unreachable. Adds a regression test that runs install-cli.sh and install-cli.ps1 against a fake releases API, wired into Cube CLI CI. CORE-694 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgekqDHTbR46jimJ7dY77N
|
Claude finished @paveltiunov's task in 2m 3s —— View job Review: 1 high (missing docs), 1 low, 1 nit. I found no bugs in the fix itself. Details
Findings
Checked and fine
TestsI couldn't run Review threadsThe listing returned 0 prior threads of mine, so there was nothing to resolve or re-affirm. I posted all 3 findings as new threads. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgekqDHTbR46jimJ7dY77N
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Drafts are listed to a GITHUB_TOKEN with push access, and their assets can't be downloaded anonymously. Also shortens the releases/latest rationale comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgekqDHTbR46jimJ7dY77N
|
Claude finished @paveltiunov's task in 2m 1s —— View job No blocking issues. Findings: 0 high, 1 medium (plausible), 1 low. Review details
Findings (inline)
Checked, no issues
Review threadsThe listing returned 0 of my own threads, so there were none to resolve or re-affirm. |
Listing 30 releases is ~2 MB uncompressed. Enable gzip on the HTTP client (~160 KB) and have the per-command background check read 10 releases (~54 KB), keeping 30 for cube update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgekqDHTbR46jimJ7dY77N
|
Claude finished @paveltiunov's task in 1m 39s —— View job Looks good to merge: 0 high, 0 medium, 1 low. Review details
Findings
Checked, no issue
Not run
Review threadsThe listing returned 0 of my own unresolved threads (no prior threads), so none were resolved or re-affirmed. |
…and the update check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgekqDHTbR46jimJ7dY77N
|
Claude finished @paveltiunov's task in 1m 39s —— View job One low-severity finding, otherwise ready to merge. The issues from the last round are all fixed. Review details
Findings
Checked, no issue
Not run
Review threadsThe listing returned 0 of my own unresolved threads (no prior threads), so none were resolved or re-affirmed. |
…lers A CUBE_RELEASES_URL mirror must not receive a CI job's repo token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgekqDHTbR46jimJ7dY77N
|
Claude finished @paveltiunov's task in 1m 59s —— View job Looks good: 0 high, 0 medium, 1 low Review details
Findings
Checked, no issues
Review threadsThe listing returned 0 of my own threads, and there are no unresolved threads on the PR. I resolved none and re-affirmed none. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgekqDHTbR46jimJ7dY77N
|
Claude finished @paveltiunov's task in 1m 30s —— View job No blocking issues: 0 high, 0 medium, 0 inline. 1 low note. Review details
Verified
Low (not posted inline)
Not run
Review threads
|
Check List
Issue Reference this PR resolves
CORE-694. Replaces #11426.
Description of Changes Made
v1.7.14 shipped without
cube-aarch64-apple-darwin.tar.gz, soinstall-cli.sh404'd on every Apple Silicon Mac. The installers download fromreleases/latest/download/…, andcube updateand the background update check read/releases/latest. All of them looked only at the single latest release. When that release lacks this platform's binary, they fail. That happens after a failed upload, and also briefly during every release: binaries are uploaded after the release is published.Now
install-cli.sh,install-cli.ps1and the CLI (update::latest_release) list recent releases. Each picks the highest stable version that lists this platform's asset:state != "uploaded") are skipped too.releases/latest.GITHUB_TOKEN, when set, is sent only toapi.github.com. It never goes to aCUBE_RELEASES_URLmirror or to download URLs.CUBE_VERSIONpinning is unchanged.curl --compressedin the installer, and reqwest'sgzipfeature in the CLI. The per-command background check reads only 10 releases (about 54 KB).cube updateand the background check now share one version comparison.reference/cli.mdxdescribes how a release is picked, plusCUBE_RELEASES_URLandGITHUB_TOKEN.Tests
rust/cube-cli/tests/installers.shruns both installers against a local fake of the releases API. The fake has:The test checks that each installer installs the right release. It fails on master (installs the real latest) and passes here. It runs in a new
installersjob in Cube CLI CI on Ubuntu and macOS, and both images havepwsh, so the PowerShell installer is covered too.Unit tests for
newest_installablecover a missing platform asset, an asset still uploading, a maintenance release published later, prereleases and drafts, and an unsupported platform.Checked by hand:
cube update --checkandinstall-cli.shagainst the real API both resolve v1.8.13.🤖 Generated with Claude Code
https://claude.ai/code/session_01TgekqDHTbR46jimJ7dY77N