From b86f515b1be78dcccb50c26973854d67fee05144 Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Tue, 30 Apr 2024 01:39:08 -0400 Subject: [PATCH] remove log stmts --- .../server/api_container_service.go | 50 ++++++++++--------- enclave-manager/web/lerna.json | 4 +- .../components/widgets/ImageButton.tsx | 2 +- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/core/server/api_container/server/api_container_service.go b/core/server/api_container/server/api_container_service.go index a4fda5bb59..c1de99148a 100644 --- a/core/server/api_container/server/api_container_service.go +++ b/core/server/api_container/server/api_container_service.go @@ -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 @@ -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 } @@ -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 } diff --git a/enclave-manager/web/lerna.json b/enclave-manager/web/lerna.json index e990fae1ca..fa2e234da9 100644 --- a/enclave-manager/web/lerna.json +++ b/enclave-manager/web/lerna.json @@ -1,7 +1,5 @@ { - "packages": [ - "packages/*" - ], + "packages": ["packages/*"], "version": "0.89.0", "npmClient": "yarn", "$schema": "node_modules/lerna/schemas/lerna-schema.json", diff --git a/enclave-manager/web/packages/app/src/emui/enclaves/components/widgets/ImageButton.tsx b/enclave-manager/web/packages/app/src/emui/enclaves/components/widgets/ImageButton.tsx index f0377300dd..32000410b3 100644 --- a/enclave-manager/web/packages/app/src/emui/enclaves/components/widgets/ImageButton.tsx +++ b/enclave-manager/web/packages/app/src/emui/enclaves/components/widgets/ImageButton.tsx @@ -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);