Skip to content

fix: upgrade openshell when installed version is below minimum#658

Merged
kjw3 merged 3 commits intomainfrom
fix/upgrade-openshell-minimum-version
Mar 22, 2026
Merged

fix: upgrade openshell when installed version is below minimum#658
kjw3 merged 3 commits intomainfrom
fix/upgrade-openshell-minimum-version

Conversation

@ericksoa
Copy link
Contributor

@ericksoa ericksoa commented Mar 22, 2026

Summary

The install script previously skipped openshell installation if any version was already present. Users on 0.0.6 would never get upgraded and hit the cgroup v2 gateway crash fixed in 0.0.7 (NVIDIA/OpenShell#329).

Now checks the installed version against a minimum (0.0.7) and upgrades automatically if too old.

Changes

scripts/install-openshell.sh — replace the early exit 0 with a version check using sort -V. If installed version is below 0.0.7, proceeds with the download/install flow instead of exiting.

Closes #136

Test plan

  • npm test — all tests pass
  • With openshell 0.0.6 installed: script upgrades to latest
  • With openshell 0.0.13 installed: script exits early (no download)
  • With no openshell installed: script installs latest

Summary by CodeRabbit

  • Chores
    • Installer now checks the existing openshell version, warns if it’s below the minimum required, and proceeds with an upgrade when needed. If the installed version meets the minimum, installation exits without changes.

The install script previously exited immediately if openshell was
already installed, regardless of version. Users on 0.0.6 would stay
on 0.0.6 and hit cgroup v2 failures fixed in 0.0.7 (OpenShell#329).

Now checks the installed version against a minimum (0.0.7) and
upgrades automatically if too old.

Closes #136
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5ee816e1-a870-44b7-a051-af958c2efc40

📥 Commits

Reviewing files that changed from the base of the PR and between 155c5fc and 252bad9.

📒 Files selected for processing (1)
  • scripts/install-openshell.sh

📝 Walkthrough

Walkthrough

The install script now enforces a minimum openshell version (0.0.7). It parses the installed version and only skips installation when the installed version is >= MIN_VERSION; otherwise it warns and continues with install/upgrade.

Changes

Cohort / File(s) Summary
Version enforcement
scripts/install-openshell.sh
Added MIN_VERSION constant (0.0.7) and version_gte() shell helper. Changed installed-version parsing and conditional logic: detect current version via openshell --version (fallback 0.0.0), warn if below minimum, and proceed to install/upgrade unless version >= MIN_VERSION.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I sniff the shell, I count each dot,
I parse the digits, hopping on the spot,
If versions lag, I tap and prod,
I nudge the installer—steady and odd,
If all is fresh, I curl and plot. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding version checking to upgrade openshell when below the minimum required version (0.0.7).

✏️ 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 fix/upgrade-openshell-minimum-version

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@scripts/install-openshell.sh`:
- Around line 36-39: The current version_gte() function uses sort -V which is
not portable on macOS; replace it with a bash-native comparator: implement
version_gte to split the two version strings (in function version_gte) on dots
into arrays and compare each numeric segment in order (pad shorter version with
zeros), returning true when first segment of $1 > $2 or when all segments are
equal; ensure it handles non-numeric suffixes robustly (treat missing segments
as 0) and is POSIX-safe for use where version_gte() is invoked during the
upgrade/cgroup fix.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5479a77f-8ec4-403a-bf73-3402c7cf1577

📥 Commits

Reviewing files that changed from the base of the PR and between 5eb4b71 and 1cb6ef1.

📒 Files selected for processing (1)
  • scripts/install-openshell.sh

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@scripts/install-openshell.sh`:
- Line 49: The current INSTALLED_VERSION assignment can return multiple
semantic-version tokens because grep -oE may emit more than one match; update
the extraction so it deterministically picks a single semantic-version (the
first match). Locate the INSTALLED_VERSION line that runs openshell --version
and change the grep usage to stop after the first match (e.g., add grep -m1 -oE
... or otherwise pipe to head -n1) so INSTALLED_VERSION always contains exactly
one x.y.z value; keep the fallback to '0.0.0' if no match is found.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 78cf97d4-db61-43c2-8f71-ed5e64b9d768

📥 Commits

Reviewing files that changed from the base of the PR and between 1cb6ef1 and 155c5fc.

📒 Files selected for processing (1)
  • scripts/install-openshell.sh

@ericksoa ericksoa self-assigned this Mar 22, 2026
@kjw3 kjw3 merged commit 42939f0 into main Mar 22, 2026
6 checks passed
craigamcw pushed a commit to craigamcw/NemoClaw that referenced this pull request Mar 22, 2026
…A#658)

* fix: upgrade openshell when installed version is below minimum

The install script previously exited immediately if openshell was
already installed, regardless of version. Users on 0.0.6 would stay
on 0.0.6 and hit cgroup v2 failures fixed in 0.0.7 (OpenShell#329).

Now checks the installed version against a minimum (0.0.7) and
upgrades automatically if too old.

Closes NVIDIA#136

* fix: use portable version comparison (no sort -V for BSD compat)

* fix: use head -1 to extract single version from openshell output
@cv cv deleted the fix/upgrade-openshell-minimum-version branch March 22, 2026 22:47
Ryuketsukami pushed a commit to Ryuketsukami/NemoClaw that referenced this pull request Mar 24, 2026
…A#658)

* fix: upgrade openshell when installed version is below minimum

The install script previously exited immediately if openshell was
already installed, regardless of version. Users on 0.0.6 would stay
on 0.0.6 and hit cgroup v2 failures fixed in 0.0.7 (OpenShell#329).

Now checks the installed version against a minimum (0.0.7) and
upgrades automatically if too old.

Closes NVIDIA#136

* fix: use portable version comparison (no sort -V for BSD compat)

* fix: use head -1 to extract single version from openshell output
jessesanford pushed a commit to jessesanford/NemoClaw that referenced this pull request Mar 24, 2026
…A#658)

* fix: upgrade openshell when installed version is below minimum

The install script previously exited immediately if openshell was
already installed, regardless of version. Users on 0.0.6 would stay
on 0.0.6 and hit cgroup v2 failures fixed in 0.0.7 (OpenShell#329).

Now checks the installed version against a minimum (0.0.7) and
upgrades automatically if too old.

Closes NVIDIA#136

* fix: use portable version comparison (no sort -V for BSD compat)

* fix: use head -1 to extract single version from openshell output
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.

Gateway failure on cgroup v2: openat2 /sys/fs/cgroup/kubepods/pids.max: no such file or directory

2 participants