Skip to content
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

fix: deprecate ConnectServices, remove calls to it #1853

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/golang/core/lib/enclaves/enclave_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ func (enclaveCtx *EnclaveContext) GetAllFilesArtifactNamesAndUuids(ctx context.C
}

// Docs available at https://docs.kurtosis.com/sdk#connectservices
// Deprecated: currently a no-op that we're removing
Copy link
Contributor

Choose a reason for hiding this comment

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

It is a no-op for Docker Cloud but not for the remote K8S use case where this call is relied on in the CLI Gateway.

func (enclaveCtx *EnclaveContext) ConnectServices(ctx context.Context, connect kurtosis_core_rpc_api_bindings.Connect) error {
args := binding_constructors.NewConnectServicesArgs(connect)
_, err := enclaveCtx.client.ConnectServices(ctx, args)
Expand Down
11 changes: 1 addition & 10 deletions cli/cli/commands/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,6 @@ func run(
var cancelFunc context.CancelFunc
var errRunningKurtosis error

connect := kurtosis_core_rpc_api_bindings.Connect_CONNECT
if noConnect {
connect = kurtosis_core_rpc_api_bindings.Connect_NO_CONNECT
}

isRemotePackage := strings.HasPrefix(starlarkScriptOrPackagePath, githubDomainPrefix)
if isRemotePackage {
responseLineChan, cancelFunc, errRunningKurtosis = executeRemotePackage(ctx, enclaveCtx, starlarkScriptOrPackagePath, starlarkRunConfig)
Expand Down Expand Up @@ -393,10 +388,6 @@ func run(

errRunningKurtosis = ReadAndPrintResponseLinesUntilClosed(responseLineChan, cancelFunc, verbosity, dryRun)

if err = enclaveCtx.ConnectServices(ctx, connect); err != nil {
logrus.Warnf("An error occurred configuring the user services port forwarding\nError was: %v", err)
}

servicesInEnclavePostRun, servicesInEnclaveError := enclaveCtx.GetServices()
if servicesInEnclaveError != nil {
logrus.Warn("Tried getting number of services in the enclave to log metrics but failed")
Expand Down Expand Up @@ -426,7 +417,7 @@ func run(
return nil
}

if connect == kurtosis_core_rpc_api_bindings.Connect_NO_CONNECT {
if noConnect {
logrus.Info("Not forwarding user service ports locally as requested")
return nil
}
Expand Down
Loading