Skip to content

registry: install oc from a channel directory - #12326

Merged
jdx merged 1 commit into
jdx:mainfrom
Marukome0743:oc-channel-urls
Aug 24, 2026
Merged

jdx merged 1 commit into
jdx:mainfrom
Marukome0743:oc-channel-urls

Conversation

@Marukome0743

@Marukome0743 Marukome0743 commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Addresses discussion #9642. Existing registry entry, so no popularity section — this is a fix, not a new tool.

Problem

oc = "stable" 404s:

Failed to install http:oc@stable: HTTP status client error (404 Not Found)
for .../ocp/stable/openshift-client-mac-arm64-stable.tar.gz

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.gz exists — but stable/ itself does.

The report shows a conda solve instead; the entry has since been reordered so http:oc is tried first, and this is where it lands now.

Fix

The mirror publishes each artifact under two names in every directory:

/ocp/stable/openshift-client-mac-arm64-4.22.9.tar.gz
/ocp/stable/openshift-client-mac-arm64.tar.gz
/ocp/4.22.9/openshift-client-mac-arm64-4.22.9.tar.gz
/ocp/4.22.9/openshift-client-mac-arm64.tar.gz

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:

  • Checksums. sha256sum.txt lists both names with the same hash, in channel and versioned directories, so verification is unaffected.
  • All five platforms serve the unversioned name.
  • Old releases. 4.14.0 and 4.10.0 serve it too. 4.10.0 has no linux-arm64 build under either name, so nothing regresses.
  • Release candidates. 4.22.0-rc.5 still installs. This one matters: version_regex only scrapes \d+\.\d+\.\d+, so rc directories were never listed either, and they install by being passed through exactly the way stable is. 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, and latest, plus 80-odd per-minor variants like stable-4.22, all the same shape.

Verification

Against the released 2026.8.10 as a control, which reproduces the 404:

control this entry
oc@stable 404 installs, Client Version: 4.22.9
oc@4.22.9 installs installs
oc@4.22.0-rc.5 installs installs

taplo check and taplo fmt --check clean against the registry schema.

Two things left for you, deliberately not in this PR

  • Channels are still not listed. mise ls-remote oc shows only x.y.z, so stable works but is not discoverable. Adding channels to version_regex would put non-semver strings under version_order = "semver" and sortVersions, which risks mise latest oc returning a channel name. Happy to do it if you want it, but it is a separate call.
  • A channel install never updates. oc@stable records the version as stable, and the http backend has no rolling-channel concept, so mise will not notice when upstream stable moves. 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

  • Bug Fixes
    • Updated OpenShift client download links across supported platforms.
    • Improved download URL handling while retaining version-specific directories.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 333be2c9-0305-4b1b-b034-e253a9559af1

📥 Commits

Reviewing files that changed from the base of the PR and between da974fb and 154d0a4.

📒 Files selected for processing (1)
  • registry/oc.toml

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The OpenShift registry now uses versioned directories with version-independent filenames for Linux, macOS, and Windows client downloads.

Changes

OpenShift download URLs

Layer / File(s) Summary
Update platform download URLs
registry/oc.toml
The Linux, macOS, and Windows artifact URLs no longer include {{ version }} in the filename. Version interpolation remains in the directory path.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 154d0

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: jdx, konono

Poem

A rabbit hops through paths so neat,
Version folders guide its feet.
No suffix tags the files below,
Linux, Mac, and Windows glow.
“Download clean!” the bunny sings.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: installing oc from a channel directory.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The 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.

  • Updates URL templates for Linux x64 and ARM64.
  • Updates URL templates for macOS x64 and ARM64.
  • Updates the Windows x64 ZIP URL template.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
registry/oc.toml Replaces version-suffixed artifact filenames with the mirror’s unversioned aliases across all five supported platform mappings; no eligible follow-up issue remains.

Reviews (3): Last reviewed commit: "registry: install oc from a channel dire..." | Re-trigger Greptile

`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>
@Marukome0743
Marukome0743 marked this pull request as ready for review August 24, 2026 02:16
@jdx
jdx merged commit 62476b4 into jdx:main Aug 24, 2026
30 checks passed
@Marukome0743
Marukome0743 deleted the oc-channel-urls branch August 24, 2026 02:21
jdx pushed a commit that referenced this pull request Aug 24, 2026
### 🚀 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants