Conversation
Captures design exploration for NVIDIA#2807 - bundling positional parameters into a CreateSandboxParams struct. Evaluates three approaches (struct, full separation, functional options) plus k8s client-go reference. Decision: creation params struct matching existing SDK conventions. Signed-off-by: Roland Huß <rhuss@redhat.com>
Signed-off-by: Roland Huß <rhuss@redhat.com>
Signed-off-by: Roland Huß <rhuss@redhat.com>
Signed-off-by: Roland Huß <rhuss@redhat.com>
…rams Introduce CreateSandboxParams struct that bundles the optional spec and labels parameters for SandboxInterface.Create(). The new signature is: Create(ctx, workspace, name string, params CreateSandboxParams, opts ...CreateOptions) This replaces the previous positional parameters (spec *SandboxSpec, labels map[string]string) with a single struct, improving call site readability and preventing callers from needing to pass nil for unused fields. Add CreateSandboxParamsToProto converter with full test coverage. Update all call sites: real client, fake client, tests, docs, and examples. BREAKING CHANGE: SandboxInterface.Create() signature changed. Callers must wrap spec and labels in a CreateSandboxParams struct. Closes NVIDIA#2807 Signed-off-by: Roland Huß <rhuss@redhat.com>
Signed-off-by: Roland Huß <rhuss@redhat.com>
rhuss
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
September 5, 2026 04:27
rhuss
marked this pull request as draft
September 5, 2026 04:36
Spec artifacts are local development files that should not be part of the PR. They are excluded via .git/info/exclude going forward. Signed-off-by: Roland Huß <rhuss@redhat.com>
Signed-off-by: Roland Huß <rhuss@redhat.com>
Contributor
Author
|
Closing this PR. After deeper investigation, the original premise was incorrect: |
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
Bundle the Go SDK's
SandboxInterface.Create()positional parameters (spec,labels) into aCreateSandboxParamsstruct, separating creation intent from the resolvedSandboxSpectype.Related Issue: Closes #2807
Changes
CreateSandboxParamsstruct insdk/go/openshell/v1/types/sandbox.goSandboxInterface.Create()signature to acceptCreateSandboxParamsCreateSandboxParamsToProtoconverter with unit testsCreate()callers must use the new struct-based signatureTesting
go test ./...)go build ./...andgo vet ./...passChecklist
!suffix)