-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix(onboard): upgrade OpenShell to 0.0.24 for sandbox survival across restarts #1587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+417
−176
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d6ffbf7
fix(onboard): upgrade OpenShell to 0.0.24 for sandbox survival across…
ericksoa 4262287
fix(test): patch streamSandboxCreate spawn in onboard interactive test
ericksoa 0407d85
fix(test): add timeout to spawnSync and mock dashboard curl in onboar…
ericksoa 93f9e85
Merge branch 'main' into test/sandbox-survival-openshell-0.0.24
ericksoa 5cb0c07
Merge branch 'main' into test/sandbox-survival-openshell-0.0.24
ericksoa 700a0f1
fix(onboard): handle unknown openshell version and upgrade stale CI i…
ericksoa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1548,7 +1548,9 @@ async function preflight() { | |
| console.log(" ⓘ Running under WSL"); | ||
| } | ||
|
|
||
| // OpenShell CLI | ||
| // OpenShell CLI — install if missing, upgrade if below minimum version. | ||
| // MIN_VERSION in install-openshell.sh handles the version gate; calling it | ||
| // when openshell already exists is safe (it exits early if version is OK). | ||
| let openshellInstall = { localBin: null, futureShellPathHint: null }; | ||
| if (!isOpenshellInstalled()) { | ||
| console.log(" openshell CLI not found. Installing..."); | ||
|
|
@@ -1558,6 +1560,37 @@ async function preflight() { | |
| console.error(" Install manually: https://github.com/NVIDIA/OpenShell/releases"); | ||
| process.exit(1); | ||
| } | ||
| } else { | ||
| // Ensure the installed version meets the minimum required by install-openshell.sh. | ||
| // The script itself is idempotent — it exits early if the version is already sufficient. | ||
| const currentVersion = getInstalledOpenshellVersion(); | ||
| if (!currentVersion) { | ||
| console.log(" openshell version could not be determined. Reinstalling..."); | ||
| openshellInstall = installOpenshell(); | ||
| if (!openshellInstall.installed) { | ||
| console.error(" Failed to reinstall openshell CLI."); | ||
| console.error(" Install manually: https://github.com/NVIDIA/OpenShell/releases"); | ||
| process.exit(1); | ||
| } | ||
| } else { | ||
| const parts = currentVersion.split(".").map(Number); | ||
| const minParts = [0, 0, 24]; // must match MIN_VERSION in scripts/install-openshell.sh | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think something that important might be better placed on some constant part of the code, on the first lines preferably if not in a separate config file |
||
| const needsUpgrade = | ||
| parts[0] < minParts[0] || | ||
| (parts[0] === minParts[0] && parts[1] < minParts[1]) || | ||
| (parts[0] === minParts[0] && parts[1] === minParts[1] && parts[2] < minParts[2]); | ||
| if (needsUpgrade) { | ||
| console.log( | ||
| ` openshell ${currentVersion} is below minimum required version. Upgrading...`, | ||
| ); | ||
| openshellInstall = installOpenshell(); | ||
| if (!openshellInstall.installed) { | ||
| console.error(" Failed to upgrade openshell CLI."); | ||
| console.error(" Install manually: https://github.com/NVIDIA/OpenShell/releases"); | ||
| process.exit(1); | ||
| } | ||
| } | ||
| } | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| console.log( | ||
| ` ✓ openshell CLI: ${runCaptureOpenshell(["--version"], { ignoreError: true }) || "unknown"}`, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems redundant with previous if, maybe it can be regrouped together to reduce branching?