Repository navigation
Conversation
WaitReady previously returned the sandbox without error when it reached Completed. A caller waiting for a sandbox almost always needs a live one, and the name suggests that, so a sandbox that completes before becoming ready is now an error that fails fast, like Stopped and Error. This matches the Rust and TypeScript SDKs in NVIDIA/OpenShell (see NVIDIA/OpenShell#5226). BREAKING CHANGE: SandboxInterface.WaitReady returns an error instead of the sandbox when it reaches the Completed phase. Callers that need to wait for a finished workload should poll the sandbox. Signed-off-by: Evan Lezar <[email protected]>
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
WaitReadyreturned the sandbox without error when it reachedCompleted. It now returns an error that names completion, likeStoppedandError. This keeps the Go SDK in line with the Rust and TypeScript SDKs, which make the same change in NVIDIA/OpenShell#5226 (tracked in NVIDIA/OpenShell#5225).This PR is a draft until there is consensus on the breaking change in NVIDIA/OpenShell#5226.
Changes
checkTerminalPhaseno longer returns success forCompletedwhen the target isSandboxReady.TestSandboxWaitReady_SandboxCompletedbecomesTestSandboxWaitReady_RejectsCompletedand expects acompleted before reaching Readyerror.Breaking change: callers that relied on
WaitReadyreturning aCompletedsandbox must poll the sandbox themselves.Testing
Not yet run in this repository. The same change passes
go test ./openshell/v1/...in NVIDIA/OpenShellsdk/go.mise run cihere needs to run on this PR.