Repository navigation
registry: install oc from a channel directory - #12326
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe OpenShift registry now uses versioned directories with version-independent filenames for Linux, macOS, and Windows client downloads. ChangesOpenShift download URLs
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This localized registry update changes artifact URLs so channel-based installs resolve correctly without changing runtime code; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThe PR updates the existing OpenShift CLI registry entry so HTTP downloads retain the requested version or channel directory while using the mirror’s unversioned artifact filenames.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "registry: install oc from a channel dire..." | Re-trigger Greptile |
154d0a4 to
68ca430
Compare
`oc = "stable"` 404s. The URL templates put the version in the filename
as well as the path, so an alias became part of the file being asked for:
Failed to install http:oc@stable: HTTP status client error (404 Not Found)
for .../ocp/stable/openshift-client-mac-arm64-stable.tar.gz
Nothing named `*-stable.tar.gz` exists, but `stable/` itself does. The
mirror publishes each artifact under two names in every directory —
`openshift-client-mac-arm64-4.22.9.tar.gz` and
`openshift-client-mac-arm64.tar.gz` — so dropping the version from the
filename resolves in a channel directory and a versioned one alike.
Checked before relying on it:
- `sha256sum.txt` lists both names with the same hash, in channel and
versioned directories, so checksum verification is unaffected.
- All five platforms serve the unversioned name.
- Old releases too: 4.14.0 and 4.10.0 serve it. 4.10.0 has no
linux-arm64 build under either name, so nothing regresses there.
- `4.22.0-rc.5` still installs, which matters because `version_regex`
only scrapes `\d+\.\d+\.\d+`. Release candidates were never listed
either, and they install by being passed through the same way `stable`
is — so rejecting versions absent from the listing would have broken
them.
This is not one special alias: the mirror carries `stable`, `fast`,
`candidate`, and `latest`, plus 80-odd per-minor variants such as
`stable-4.22`, and they all take the same shape.
Verified against the released 2026.8.10 as a control, which reproduces
the 404; with this entry `oc@stable` installs and reports 4.22.9.
Discussion #9642.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
68ca430 to
165cb38
Compare
### 🚀 Features - **(bootstrap)** add package plugin uninstall support by @jdx in [#12332](#12332) ### 🐛 Bug Fixes - **(brew-cask)** recognize Homebrew-owned casks by @donbeave in [#12346](#12346) - **(cli)** report a cd target it cannot enter instead of panicking by @JamBalaya56562 in [#12314](#12314) - **(config)** skip disabled idiomatic tracked configs by @xqm32 in [#12194](#12194) - **(config)** keep comments when saving from mise edit by @Marukome0743 in [#12319](#12319) - **(config)** strip a byte-order mark before reading a version file by @JamBalaya56562 in [#12325](#12325) - **(doctor)** report installs that provide no executables by @Marukome0743 in [#12321](#12321) - **(env)** say why an age SSH identity could not be used by @Marukome0743 in [#12339](#12339) - **(env)** name the key and file behind an unexpanded $VAR by @Marukome0743 in [#12316](#12316) - **(go)** don't hand go install a GOROOT from another Go by @Marukome0743 in [#12342](#12342) - **(task)** treat a SIGINT-killed child as an interruption by @Marukome0743 in [#12323](#12323) - **(task)** preserve string type for usage value flags by @jdx in [#12355](#12355) - **(tasks)** tell Windows users why a task file was skipped by @JamBalaya56562 in [#12324](#12324) - **(tool-stub)** keep env_with_path instead of rebuilding PATH by @tmkx in [#12322](#12322) - **(watch)** restore the controlling terminal from a drop guard by @Marukome0743 in [#12328](#12328) ### 🚜 Refactor - **(cli)** keep one copy of the task-flag escape rule by @JamBalaya56562 in [#12343](#12343) ### 📚 Documentation - **(tasks)** point extensionless pwsh tasks at MISE_TASK_DIR by @JamBalaya56562 in [#12313](#12313) ### 📦️ Dependency Updates - update rust crate aube-registry to v2.1.0 by @renovate[bot] in [#12348](#12348) - bump aube to 2.1.0 by @jdx in [#12351](#12351) - bump usage to 6.2.0 by @jdx in [#12354](#12354) ### 📦 Registry - fix usage version test by @jdx in [#12349](#12349) - install oc from a channel directory by @Marukome0743 in [#12326](#12326) ### Chore - **(ci)** use github runners for fork prs by @jdx in [#12345](#12345) - **(ci)** prevent cache warmer starvation by @jdx in [#12350](#12350) ### New Contributors - @tmkx made their first contribution in [#12322](#12322)
Addresses discussion #9642. Existing registry entry, so no popularity section — this is a fix, not a new tool.
Problem
oc = "stable"404s:The URL templates put the version in the filename as well as the path, so the alias became part of the file being asked for. Nothing named
*-stable.tar.gzexists — butstable/itself does.The report shows a conda solve instead; the entry has since been reordered so
http:ocis tried first, and this is where it lands now.Fix
The mirror publishes each artifact under two names in every directory:
Dropping the version from the filename resolves in a channel directory and a versioned one alike. Five lines, no code change.
Checked before relying on it:
sha256sum.txtlists both names with the same hash, in channel and versioned directories, so verification is unaffected.4.22.0-rc.5still installs. This one matters:version_regexonly scrapes\d+\.\d+\.\d+, so rc directories were never listed either, and they install by being passed through exactly the waystableis. Rejecting versions absent from the listing — the other obvious fix — would have broken them.It is also not one special alias. The mirror carries
stable,fast,candidate, andlatest, plus 80-odd per-minor variants likestable-4.22, all the same shape.Verification
Against the released 2026.8.10 as a control, which reproduces the 404:
oc@stableClient Version: 4.22.9oc@4.22.9oc@4.22.0-rc.5taplo checkandtaplo fmt --checkclean against the registry schema.Two things left for you, deliberately not in this PR
mise ls-remote ocshows onlyx.y.z, sostableworks but is not discoverable. Adding channels toversion_regexwould put non-semver strings underversion_order = "semver"andsortVersions, which risksmise latest ocreturning a channel name. Happy to do it if you want it, but it is a separate call.oc@stablerecords the version asstable, and thehttpbackend has no rolling-channel concept, so mise will not notice when upstreamstablemoves. That is not a regression — today it cannot install at all — but it is the same shape as Neovim `nightly` is not detected as outdated #10017.AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5; version: 2.1.231.
Summary by CodeRabbit