Skip to content

OSMO 6.3 prerelease deploy: pin CLI to OSMO_CLI_REF (no sudo), chart-version discovery, agent prompts for GPU/region/Azure inputs - #1031

Merged
vvnpn-nv merged 5 commits into
mainfrom
vivianp/fix-cli-version-pin-and-ux
May 21, 2026
Merged

vvnpn-nv merged 5 commits into
mainfrom
vivianp/fix-cli-version-pin-and-ux

Conversation

@vvnpn-nv

@vvnpn-nv vvnpn-nv commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

Three agent-driven OSMO deploy bugs hit on Azure when targeting the 6.3-prerelease channel. All three were single-deploy blockers; addressed here as one PR with four logically-separable commits.

Issue #None

What's in this PR

  1. deployments/scripts/common.sh — install_osmo_cli_if_missing now honors OSMO_CLI_REF properly. When set to a non-"main" release tag, the helper downloads the matching platform installer directly from releases/download/<ref>/, extracts the embedded tarball, and copies bin/osmo to $HOME/.local/bin (or OSMO_CLI_TARGET) — no sudo. Hard-fails on a missing __ARCHIVE_BELOW__ marker rather than silently falling through to the sudo path. Default OSMO_CLI_REF=main flow unchanged (still pipes install.sh).

  2. deployments/scripts/deploy-osmo-minimal.sh — two new provider-less actions:

    • --list-chart-versions runs helm search repo <chart> --versions --devel per OSMO_CHART_NAMES (default service + backend-operator) so agents can discover prereleases (helm hides them otherwise).
    • --find-gpu-region <sku> <count> iterates TF_REGION_CANDIDATES and prints the first Azure region with enough quota; used by the SKILL's region prompt when the user answers idk.

    Also: show_help documents OSMO_CLI_REF/OSMO_CLI_TARGET and removes the stale "nvstaging" guidance. Fixes a set -u bash3 empty-array expansion bug introduced by my own list_chart_versions (same ${arr[@]+\"${arr[@]}\"} idiom used in storage/common.sh).

  3. deployments/scripts/azure/terraform.sh — azure_describe_vm_sku + azure_find_region_with_gpu_quota helpers backing --find-gpu-region. Uses az vm list-skus/az vm list-usage with object JMESPath projection (so -o tsv emits one tab-separated line); no hardcoded SKU→family or vCPU-per-node tables. azure_generate_tfvars now writes gpu_vm_size / gpu_min / gpu_max from TF_GPU_* env vars. No new interactive prompts in the bash flow — those live in the SKILL.md (next item).

  4. skills/osmo-deploy/SKILL.md —

    • Mandatory 6.3+ pinning: frontmatter + "When to Use" + new "Picking chart, image, and CLI versions" section all state the skill requires OSMO >= 6.3 and the default (no env vars) lands on an incompatible GA. All three pins (OSMO_CHART_VERSION + OSMO_IMAGE_TAG + OSMO_CLI_REF) must be set before invoking the script.
    • Required user inputs: explicit prompt list the agent should run BEFORE invoking deploy-osmo-minimal.sh — "Do you need GPUs?", "How many?", "What kind?" (informal name → SKU table), "What region? (idk → --find-gpu-region)", Azure subscription ID, resource group name. Replaces the bash interactive flow's missing GPU/region prompts.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes. (Bash scripts in deployments/scripts/ have no unit-test home per AGENTS.md; verification is live-deploy. The --list-chart-versions and --find-gpu-region actions are exercised by the osmo-deploy skill flow.)
  • The documentation is up to date with these changes. (skills/osmo-deploy/SKILL.md updated in commit 4; show_help text in deploy-osmo-minimal.sh updated in commit 2.)

Test plan

  • --list-chart-versions prints both stable and prerelease chart versions when run against nvidia/osmo.
  • --find-gpu-region Standard_NC40ads_H100_v5 3 returns an Azure region with quota or exits non-zero with a clear error (object JMESPath projection regression-tested locally).
  • install_osmo_cli_if_missing with OSMO_CLI_REF=6.3.0-prerelease-rc9 and no sudo: downloads the rc9 installer, extracts to $HOME/.local/bin, osmo --version prints rc9.
  • install_osmo_cli_if_missing hard-fails (no silent fallback to sudo) when the installer is missing __ARCHIVE_BELOW__.
  • OSMO_CLI_REF=main (default) path unchanged.
  • Live Azure redeploy through the agent prompt flow with OSMO_CHART_VERSION=1.3.0-prerelease-rc9 OSMO_IMAGE_TAG=6.3.0-prerelease-rc9 OSMO_CLI_REF=6.3.0-prerelease-rc9 — pending in the parent session.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Optional GPU node-pool provisioning for Azure AKS with automatic region-quota discovery
    • Provider-less discovery mode to list Helm chart versions and locate GPU-capable regions
    • Configurable OSMO CLI installation (pin by ref and custom install target)
  • Documentation

    • Expanded deployment guide: OSMO ConfigMap-mode requirement, mandatory pinning workflow, GPU prompts and region-selection guidance

Review Change Stack

vvnpn-nv and others added 4 commits May 21, 2026 11:06
When OSMO_CLI_REF is set to a non-"main" release tag (e.g.
6.3.0-prerelease-rc9), the previous flow piped install.sh from that ref —
but install.sh always resolves to releases/latest/download/version.txt
regardless of which ref fetched it. Deploying a prerelease left users
with the latest-GA CLI. Also the install.sh path requires sudo to write
to /usr/local/bin and hard-fails in non-interactive shells without
NOPASSWD, blocking the deploy script's backend-operator setup.

New flow when OSMO_CLI_REF is set to a release tag:
  - Resolve platform-specific installer URL from
    github.com/NVIDIA/OSMO/releases/download/<ref>/
  - Linux: download self-extracting .sh, locate __ARCHIVE_BELOW__,
    extract tarball, copy bin/osmo to OSMO_CLI_TARGET
    (default $HOME/.local/bin — no sudo).
  - macOS .pkg falls back to sudo since it has no archive marker.
  - Hard-fail (don't fall through to ./installer) when the marker is
    missing — silent regression to sudo defeats the purpose.
  - Warn if OSMO_CLI_TARGET isn't on PATH in any shell rc.

Default ref ("main") path is unchanged.

Reported in nvbug 6199725 issue 2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tions

Two provider-less actions that exit before --provider validation, used
by agent-driven setup flows (see skills/osmo-deploy/SKILL.md):

  --list-chart-versions
    Runs `helm search repo <chart> --versions --devel` for every chart
    in OSMO_CHART_NAMES (default: "service backend-operator"). The
    --devel flag is what surfaces prerelease tags — without it, an
    agent running `helm search` only sees GA versions and incorrectly
    assumes prereleases live in a different NGC org.

  --find-gpu-region SKU COUNT
    Prints the first Azure region (from TF_REGION_CANDIDATES,
    env-overridable) with enough quota for COUNT x SKU. Exits non-zero
    if none qualify. Sources azure/terraform.sh and delegates to
    azure_find_region_with_gpu_quota. Used by the osmo-deploy skill's
    region prompt when the user answers "idk".

show_help cleanup:
  - Document OSMO_CLI_REF + OSMO_CLI_TARGET env vars (paired with the
    common.sh CLI install fix).
  - Update OSMO_CHART_VERSION docs to mention --devel handling.
  - Document the new provider-less actions.

Also: fix the `auth_args=()` empty-array expansion in list_chart_versions
under set -u (same bash3 idiom the storage/common.sh fix used —
`${arr[@]+"${arr[@]}"}`). The original "${auth_args[@]}" form errored
"unbound variable" whenever NGC_API_KEY was unset (the common case).

Reported in nvbug 6199725 issues 1 + 3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
New helpers used by deploy-osmo-minimal.sh's --find-gpu-region action
(which agent-driven flows call when the user answers "idk" to the
region prompt):

  azure_describe_vm_sku <sku>
    Returns "<family>\t<vcpus>" via one `az vm list-skus` call. Object
    JMESPath projection ("[0].{f:family, v:capabilities[?name=='vCPUs'].value | [0]}")
    keeps both fields on one tab-separated line; array form ("[0].[a,b]")
    renders each element on its own line under `-o tsv` which would
    break `read -r family vcpus`.

  azure_find_region_with_gpu_quota <sku> <count> <subscription>
    Iterates TF_REGION_CANDIDATES (env-overridable, defaults to
    H100-likely Azure regions) and prints the first region with
    sufficient quota for COUNT x SKU. No hardcoded SKU→family or
    vCPU-per-node tables — `az` is the single source of truth. Same
    object-projection fix for the list-usage query.

Also: tfvars now writes gpu_vm_size / gpu_min / gpu_max from
TF_GPU_VM_SIZE / TF_GPU_COUNT (set by the agent before invoking the
script). TF_GPU_NODE_POOL_ENABLED + TF_GPU_COUNT + TF_GPU_VM_SIZE +
TF_REGION_CANDIDATES added as env-overridable defaults near the top.

The interactive flow itself is unchanged — GPU/region prompts live in
skills/osmo-deploy/SKILL.md (agent-facing), not in the bash script.

Reported in nvbug 6199725 (agent-UX request).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…/Azure

Two additions to the agent-facing SKILL.md:

1. "Required user inputs" section — explicit prompt list the agent should
   run BEFORE invoking deploy-osmo-minimal.sh:
   - Do you need GPUs? (Y/N)
   - How many GPUs?
   - What kind of GPU? (informal name → SKU translation table)
   - What region do you have availability? (idk → calls --find-gpu-region)
   - Azure subscription ID (if not in env)
   - Resource group name (if not in env; must already exist)
   The agent maps answers to env vars (TF_GPU_*, TF_REGION, etc.) and
   invokes the script in --non-interactive mode. This replaces the bash
   interactive flow's GPU prompts that were never added.

2. "Picking chart, image, and CLI versions" section + frontmatter +
   "When to Use" callouts that make the 6.3+ requirement mandatory:
   - The default behavior (no env vars set) resolves to the latest GA,
     which is older than 6.3 and incompatible with this skill (chart
     attempts `osmo config update` against ConfigMap-mode service →
     HTTP 409).
   - All three pins (OSMO_CHART_VERSION + OSMO_IMAGE_TAG + OSMO_CLI_REF)
     must be set to a 6.3.x release before invoking the script.
   - --list-chart-versions is the authoritative discovery action.
   - Why each pin matters explained in generic terms (not tied to the
     specific incident bug).

Both changes reported in nvbug 6199725.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vvnpn-nv
vvnpn-nv requested a review from a team as a code owner May 21, 2026 18:12
@coderabbitai

coderabbitai Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Adds optional Azure GPU AKS node-pool provisioning and quota-based region selection, pins/downloads OSMO CLI release assets to a configurable target, enables provider-less discovery (--list-chart-versions, --find-gpu-region) in the deploy script, and expands deployment docs with interactive GPU prompts and version-pinning guidance.

Changes

OSMO GPU Deployment & CLI Pinning

Layer / File(s) Summary
Azure GPU node pool infrastructure
deployments/scripts/azure/terraform.sh
Adds GPU configuration defaults (TF_GPU_NODE_POOL_ENABLED, TF_GPU_COUNT, TF_GPU_VM_SIZE, TF_REGION_CANDIDATES), implements azure_describe_vm_sku() and azure_find_region_with_gpu_quota() to query SKUs and scan candidate regions for vCPU quota, updates interactive summary display, and emits GPU node-pool parameters into terraform.tfvars.
OSMO CLI installation with pinning support
deployments/scripts/common.sh
Enhances install_osmo_cli_if_missing() to support OSMO_CLI_REF (pin to release asset) and OSMO_CLI_TARGET (install directory), selects OS/arch-specific assets, downloads with curl/retries, extracts Linux .sh installers from embedded archive, handles macOS .pkg, and updates PATH/target messaging.
Provider-less discovery modes
deployments/scripts/deploy-osmo-minimal.sh
Adds --list-chart-versions and --find-gpu-region flags, extends help text, updates argument parsing, implements list_chart_versions() (helm repo/search with optional NGC auth), and early-exit flows that delegate GPU-region selection to the Azure helper.
User-facing version compatibility & pinning guidance
skills/osmo-deploy/SKILL.md
Emphasizes ConfigMap-mode requirement, adds interactive "Required user inputs" flow for GPU selection and provider details, describes --find-gpu-region quota-based selection, and prescribes pinning OSMO_CHART_VERSION, OSMO_IMAGE_TAG, and OSMO_CLI_REF with discovery commands.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • RyaliNvidia
  • cypres

Poem

🐰 I hopped through scripts to fetch the right SKU,
I checked quotas wide — found regions true,
I pinned the CLI where users can see,
Listed charts and counted GPUs with glee.
Bunny says: deploy safely — hop with me! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title comprehensively summarizes the three main changes: CLI pinning via OSMO_CLI_REF without sudo, chart-version discovery via --list-chart-versions, and agent prompts for GPU/region/Azure configuration inputs.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vivianp/fix-cli-version-pin-and-ux

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@deployments/scripts/deploy-osmo-minimal.sh`:
- Around line 345-351: The --find-gpu-region case reads positional args into
FIND_GPU_REGION_SKU and FIND_GPU_REGION_COUNT without checking argument count,
which breaks under set -u; before assigning $2/$3 (in the --find-gpu-region
branch) validate there are at least two additional positional arguments (e.g.
test remaining $# or inspect "$2" and "$3") and if not print a clear usage/error
and exit non-zero; only then assign FIND_GPU_REGION_SKU="$2" and
FIND_GPU_REGION_COUNT="$3" and shift 3 so malformed invocations fail with a
controlled message instead of an unbound variable error.

In `@skills/osmo-deploy/SKILL.md`:
- Line 83: Update the guidance to reflect that the deploy preflight can
auto-create the resource group when TF_RESOURCE_GROUP is provided: change the
sentence that currently states "The group must already exist" to indicate that
if the group does not exist and TF_RESOURCE_GROUP is set (or --resource-group is
supplied), the preflight will attempt to create it (using az group create -n
<rg> -l <region>); otherwise, instruct the operator to create the group manually
with az group create -n <rg> -l <region> before continuing. Reference
TF_RESOURCE_GROUP and the --resource-group flag, and keep the az group show / az
group create commands as examples.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 29c559c5-5cea-45aa-8abc-90aa45a20c5a

📥 Commits

Reviewing files that changed from the base of the PR and between 9ce52d9 and 17a638d.

📒 Files selected for processing (4)
  • deployments/scripts/azure/terraform.sh
  • deployments/scripts/common.sh
  • deployments/scripts/deploy-osmo-minimal.sh
  • skills/osmo-deploy/SKILL.md

Comment thread deployments/scripts/deploy-osmo-minimal.sh
Comment thread skills/osmo-deploy/SKILL.md Outdated
vvnpn-nv added a commit that referenced this pull request May 21, 2026
…s, fix RG guidance

Three review-driven fixes:

1. `deployments/scripts/deploy-osmo-minimal.sh` — `--find-gpu-region`
   case now checks `$# >= 3` before reading `$2`/`$3`. Malformed
   invocations like `--find-gpu-region` or `--find-gpu-region foo` now
   print a clear usage line and exit 2 instead of tripping `set -u` with
   an "unbound variable" error. (CodeRabbit finding 1.)

2. Strip all hardcoded release tags (6.3.x, 6.3.0-prerelease-rc9, 1.3.x,
   1.2.1, etc.) from `common.sh`, `deploy-osmo-minimal.sh` show_help,
   and `skills/osmo-deploy/SKILL.md`. Replace the "OSMO >= 6.3" framing
   with "ConfigMap mode" (the actual technical requirement — earlier
   CLI-write mode is what's incompatible, and the version cutoff
   between them is incidental). The skill now consistently points
   users at `--list-chart-versions` for current values. (Per-session
   directive: PR text must be version-tag-free so the doc doesn't
   rot as new release pairs ship.)

3. `skills/osmo-deploy/SKILL.md` — resource-group guidance now matches
   actual script behavior. azure/terraform.sh:529 auto-creates the
   group (tagged `osmo-deploy-managed=true`) when `TF_RESOURCE_GROUP`
   is set and the group doesn't pre-exist; the skill was saying the
   group must pre-exist, which conflicted. Updated to: pass the name
   and let the script create it; create manually only if you want the
   group to outlive `terraform destroy`. (CodeRabbit finding 2.)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tags, fix RG guidance

Three review-driven fixes:

1. `deployments/scripts/deploy-osmo-minimal.sh` — `--find-gpu-region`
   case now checks `$# >= 3` before reading `$2`/`$3`. Malformed
   invocations like `--find-gpu-region` or `--find-gpu-region foo` now
   print a clear usage line and exit 2 instead of tripping `set -u` with
   an "unbound variable" error. (CodeRabbit finding 1.)

2. Strip hardcoded prerelease RC tags (`6.3.0-prerelease-rc9`,
   `1.3.0-prerelease-rc9`) from `common.sh`, `deploy-osmo-minimal.sh`
   show_help, and `skills/osmo-deploy/SKILL.md`. Keep the `>= 6.3` /
   `6.3.x` / `6.2` framing — those are stable minor-version references
   that don't rot when new RCs ship. The skill now consistently points
   users at `--list-chart-versions` for the actual current tags.

3. `skills/osmo-deploy/SKILL.md` — resource-group guidance now matches
   actual script behavior. azure/terraform.sh:529 auto-creates the
   group (tagged `osmo-deploy-managed=true`) when `TF_RESOURCE_GROUP`
   is set and the group doesn't pre-exist; the skill was saying the
   group must pre-exist, which conflicted. Updated to: pass the name
   and let the script create it; create manually only if you want the
   group to outlive `terraform destroy`. (CodeRabbit finding 2.)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vvnpn-nv
vvnpn-nv force-pushed the vivianp/fix-cli-version-pin-and-ux branch from d3aa2be to cc04d57 Compare May 21, 2026 18:35

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@deployments/scripts/deploy-osmo-minimal.sh`:
- Around line 203-211: Update the doc text for OSMO_CLI_REF to clarify that
--list-chart-versions returns chart versions (not CLI release tags) and instruct
the user to first discover the chart version with --list-chart-versions and then
pick the corresponding GitHub release tag to use for OSMO_CLI_REF; keep
references to OSMO_CHART_VERSION/OSMO_IMAGE_TAG and OSMO_CLI_TARGET
($HOME/.local/bin) intact so users understand when to pin the CLI ref versus the
chart/image tags.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f4e747a9-4e25-4d57-bb39-3673be99b7f9

📥 Commits

Reviewing files that changed from the base of the PR and between 17a638d and d3aa2be.

📒 Files selected for processing (3)
  • deployments/scripts/common.sh
  • deployments/scripts/deploy-osmo-minimal.sh
  • skills/osmo-deploy/SKILL.md

Comment thread deployments/scripts/deploy-osmo-minimal.sh

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
deployments/scripts/common.sh (1)

197-208: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Honor OSMO_CLI_REF even when osmo is already on PATH.

This early return makes the pinning fix a no-op on any machine that already has osmo installed. A prerelease deploy can still run with a mismatched GA CLI, which is the exact compatibility problem this change is meant to prevent. If OSMO_CLI_REF != main, either verify the installed CLI matches that ref and reinstall when it does not, or fail loudly instead of silently succeeding.

Possible minimal safeguard
 install_osmo_cli_if_missing() {
-    if command -v osmo &>/dev/null; then
-        return 0
-    fi
-    log_info "Installing osmo CLI from GitHub"
+    local osmo_cli_ref="${OSMO_CLI_REF:-main}"
+    if command -v osmo &>/dev/null; then
+        if [[ "$osmo_cli_ref" == "main" ]]; then
+            return 0
+        fi
+        log_error "Found an existing osmo on PATH, but OSMO_CLI_REF=$osmo_cli_ref requires a matching CLI."
+        log_error "Remove the existing binary or extend this helper to verify/reinstall the requested ref."
+        return 1
+    fi
+    log_info "Installing osmo CLI from GitHub"
     if ! command -v curl &>/dev/null; then
         log_error "curl is required to install the osmo CLI"
         return 1
     fi
-
-    local osmo_cli_ref="${OSMO_CLI_REF:-main}"
     local osmo_cli_target="${OSMO_CLI_TARGET:-$HOME/.local/bin}"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deployments/scripts/common.sh` around lines 197 - 208, The early return in
install_osmo_cli_if_missing skips honoring OSMO_CLI_REF when osmo is on PATH;
change the function to check OSMO_CLI_REF when osmo exists: if OSMO_CLI_REF is
unset or "main" keep the current fast-return behavior, otherwise invoke a
verification step (e.g., run osmo --version or a command that outputs its git
ref or commit) and compare to OSMO_CLI_REF; if it matches return success, if it
does not match either reinstall from GitHub using OSMO_CLI_REF or log an error
and exit non-zero. Update references to OSMO_CLI_REF and the verification logic
inside install_osmo_cli_if_missing so the function enforces the pinned ref even
when osmo is already present.
♻️ Duplicate comments (1)
deployments/scripts/deploy-osmo-minimal.sh (1)

203-211: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Don't tell users --list-chart-versions discovers CLI tags.

That command lists Helm chart versions, not GitHub release tags. The current wording can send users to an invalid OSMO_CLI_REF if the tag naming ever diverges. Reword this to say: use --list-chart-versions to pick OSMO_CHART_VERSION, then set OSMO_CLI_REF to the matching GitHub release tag.

Suggested wording
   OSMO_CLI_REF           Pin osmo CLI to a release tag from
                          github.com/NVIDIA/OSMO/releases. Required when
                          deploying a channel that doesn't match the latest
                          GA. Default "main" pipes install.sh which always
                          resolves to the latest GA — pin this when you
                          pin OSMO_CHART_VERSION/OSMO_IMAGE_TAG. Pinned ref
                          installs without sudo to OSMO_CLI_TARGET
                          ($HOME/.local/bin by default). Discover available
-                         tags with --list-chart-versions.
+                         chart versions with --list-chart-versions, then set
+                         OSMO_CLI_REF to the matching GitHub release tag.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deployments/scripts/deploy-osmo-minimal.sh` around lines 203 - 211, Update
the help text for OSMO_CLI_REF to stop saying "--list-chart-versions" discovers
CLI tags: clarify that "--list-chart-versions" lists Helm chart versions (used
to pick OSMO_CHART_VERSION) and instruct users to set OSMO_CLI_REF to the
matching GitHub release tag for the CLI (OSMO_CLI_REF), so they first use
--list-chart-versions to choose OSMO_CHART_VERSION and then set OSMO_CLI_REF to
the corresponding GitHub release tag.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@deployments/scripts/common.sh`:
- Around line 197-208: The early return in install_osmo_cli_if_missing skips
honoring OSMO_CLI_REF when osmo is on PATH; change the function to check
OSMO_CLI_REF when osmo exists: if OSMO_CLI_REF is unset or "main" keep the
current fast-return behavior, otherwise invoke a verification step (e.g., run
osmo --version or a command that outputs its git ref or commit) and compare to
OSMO_CLI_REF; if it matches return success, if it does not match either
reinstall from GitHub using OSMO_CLI_REF or log an error and exit non-zero.
Update references to OSMO_CLI_REF and the verification logic inside
install_osmo_cli_if_missing so the function enforces the pinned ref even when
osmo is already present.

---

Duplicate comments:
In `@deployments/scripts/deploy-osmo-minimal.sh`:
- Around line 203-211: Update the help text for OSMO_CLI_REF to stop saying
"--list-chart-versions" discovers CLI tags: clarify that "--list-chart-versions"
lists Helm chart versions (used to pick OSMO_CHART_VERSION) and instruct users
to set OSMO_CLI_REF to the matching GitHub release tag for the CLI
(OSMO_CLI_REF), so they first use --list-chart-versions to choose
OSMO_CHART_VERSION and then set OSMO_CLI_REF to the corresponding GitHub release
tag.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e0c29079-45b3-4a02-adfc-7def29d11261

📥 Commits

Reviewing files that changed from the base of the PR and between d3aa2be and cc04d57.

📒 Files selected for processing (3)
  • deployments/scripts/common.sh
  • deployments/scripts/deploy-osmo-minimal.sh
  • skills/osmo-deploy/SKILL.md
✅ Files skipped from review due to trivial changes (1)
  • skills/osmo-deploy/SKILL.md

@vvnpn-nv
vvnpn-nv merged commit 776d299 into main May 21, 2026
13 checks passed
@vvnpn-nv
vvnpn-nv deleted the vivianp/fix-cli-version-pin-and-ux branch May 21, 2026 18:49
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.

3 participants