Skip to content

Commit

Permalink
Remove usage of Connect Services / use the noConnet flag directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar committed Nov 27, 2023
1 parent 71bdab5 commit 151d02d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
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
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

0 comments on commit 151d02d

Please sign in to comment.