Skip to content

Commit

Permalink
remove log stmts
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Apr 30, 2024
1 parent 19129ab commit b86f515
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
50 changes: 26 additions & 24 deletions core/server/api_container/server/api_container_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,20 @@ func (apicService *ApiContainerService) RunStarlarkScript(args *kurtosis_core_rp
args.GetExperimentalFeatures(),
stream)

apicService.starlarkRun = &kurtosis_core_rpc_api_bindings.GetStarlarkRunResponse{
PackageId: apicService.starlarkRun.PackageId,
SerializedScript: serializedStarlarkScript,
SerializedParams: serializedParams,
Parallelism: int32(parallelism),
RelativePathToMainFile: startosis_constants.PlaceHolderMainFileForPlaceStandAloneScript,
MainFunctionName: mainFuncName,
ExperimentalFeatures: experimentalFeatures,
RestartPolicy: apicService.restartPolicy,
}
var initialSerializedParams *string
if apicService.starlarkRun.InitialSerializedParams == nil || *apicService.starlarkRun.InitialSerializedParams == "" {
logrus.Infof("updating initial params with: %v", serializedParams)
apicService.starlarkRun.InitialSerializedParams = &serializedParams
initialSerializedParams = &apicService.starlarkRun.SerializedParams
}
apicService.starlarkRun = &kurtosis_core_rpc_api_bindings.GetStarlarkRunResponse{
PackageId: apicService.starlarkRun.PackageId,
SerializedScript: serializedStarlarkScript,
SerializedParams: serializedParams,
Parallelism: int32(parallelism),
RelativePathToMainFile: startosis_constants.PlaceHolderMainFileForPlaceStandAloneScript,
MainFunctionName: mainFuncName,
ExperimentalFeatures: experimentalFeatures,
RestartPolicy: apicService.restartPolicy,
InitialSerializedParams: initialSerializedParams,
}

return nil
Expand Down Expand Up @@ -322,18 +323,20 @@ func (apicService *ApiContainerService) RunStarlarkPackage(args *kurtosis_core_r
serializedParams)
apicService.runStarlark(parallelism, dryRun, detectedPackageId, detectedPackageReplaceOptions, mainFuncName, actualRelativePathToMainFile, scriptWithRunFunction, serializedParams, downloadMode, nonBlockingMode, args.ExperimentalFeatures, stream)

var initialSerializedParams *string
if apicService.starlarkRun.InitialSerializedParams == nil || *apicService.starlarkRun.InitialSerializedParams == "" {
initialSerializedParams = &apicService.starlarkRun.SerializedParams
}
apicService.starlarkRun = &kurtosis_core_rpc_api_bindings.GetStarlarkRunResponse{
PackageId: packageIdFromArgs,
SerializedScript: scriptWithRunFunction,
SerializedParams: serializedParams,
Parallelism: int32(parallelism),
RelativePathToMainFile: requestedRelativePathToMainFile,
MainFunctionName: mainFuncName,
ExperimentalFeatures: args.ExperimentalFeatures,
RestartPolicy: apicService.restartPolicy,
}
if apicService.starlarkRun.InitialSerializedParams != nil && *apicService.starlarkRun.InitialSerializedParams == emptySerializedParams {
apicService.starlarkRun.InitialSerializedParams = &serializedParams
PackageId: packageIdFromArgs,
SerializedScript: scriptWithRunFunction,
SerializedParams: serializedParams,
Parallelism: int32(parallelism),
RelativePathToMainFile: requestedRelativePathToMainFile,
MainFunctionName: mainFuncName,
ExperimentalFeatures: args.ExperimentalFeatures,
RestartPolicy: apicService.restartPolicy,
InitialSerializedParams: initialSerializedParams,
}
return nil
}
Expand Down Expand Up @@ -614,7 +617,6 @@ func (apicService *ApiContainerService) ListFilesArtifactNamesAndUuids(_ context
}

func (apicService *ApiContainerService) GetStarlarkRun(_ context.Context, _ *emptypb.Empty) (*kurtosis_core_rpc_api_bindings.GetStarlarkRunResponse, error) {
logrus.Infof("initiali serialized params %v", apicService.starlarkRun.InitialSerializedParams)
return apicService.starlarkRun, nil
}

Expand Down
4 changes: 1 addition & 3 deletions enclave-manager/web/lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"packages": [
"packages/*"
],
"packages": ["packages/*"],
"version": "0.89.0",
"npmClient": "yarn",
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const SetImageModel = ({ isOpen, onClose, currentImage, serviceName, encl
console.log(`initial serialized params: ${starlarkRun.value.initialSerializedParams}`);
argsRecord = deserializeParams(starlarkRun.value.initialSerializedParams);
} else {
console.log(`serialized params: ${starlarkRun.value.initialSerializedParams}`);
console.log(`serialized params: ${starlarkRun.value.serializedParams}`);
argsRecord = deserializeParams(starlarkRun.value.serializedParams);
}
const args = objectToStarlark(argsRecord, 8);
Expand Down

0 comments on commit b86f515

Please sign in to comment.