From 0f3a973067002398602897b3dffc5a082e0ec3e2 Mon Sep 17 00:00:00 2001 From: kurtosisbot Date: Fri, 16 Dec 2022 15:50:07 +0000 Subject: [PATCH] Committing 0.62.0 files --- api/golang/core/lib/enclaves/enclave_context.go | 4 ++-- api/golang/core/lib/services/container_config.go | 10 +++++----- api/golang/core/lib/services/service_config_builder.go | 4 +++- api/golang/kurtosis_version/kurtosis_version.go | 2 +- api/typescript/package.json | 2 +- .../src/core/lib/enclaves/enclave_context.ts | 4 ++-- .../src/core/lib/enclaves/starlark_run_blocking.ts | 2 +- .../src/core/lib/services/container_config.ts | 6 +++--- .../src/kurtosis_version/kurtosis_version.ts | 2 +- 9 files changed, 19 insertions(+), 17 deletions(-) diff --git a/api/golang/core/lib/enclaves/enclave_context.go b/api/golang/core/lib/enclaves/enclave_context.go index 76385cf..fc00381 100644 --- a/api/golang/core/lib/enclaves/enclave_context.go +++ b/api/golang/core/lib/enclaves/enclave_context.go @@ -284,8 +284,8 @@ func (enclaveCtx *EnclaveContext) AddServicesToPartition( for serviceID, containerConfig := range containerConfigs { logrus.Tracef("Creating files artifact ID str -> mount dirpaths map for service with Id '%v'...", serviceID) artifactIdStrToMountDirpath := map[string]string{} - for filesArtifactID, mountDirpath := range containerConfig.GetFilesArtifactMountpoints() { - artifactIdStrToMountDirpath[string(filesArtifactID)] = mountDirpath + for mountDirpath, filesArtifactID := range containerConfig.GetFilesArtifactMountpoints() { + artifactIdStrToMountDirpath[mountDirpath] = string(filesArtifactID) } logrus.Tracef("Successfully created files artifact ID str -> mount dirpaths map for service with ID '%v'", serviceID) privatePorts := containerConfig.GetUsedPorts() diff --git a/api/golang/core/lib/services/container_config.go b/api/golang/core/lib/services/container_config.go index b8972b3..3699bc3 100644 --- a/api/golang/core/lib/services/container_config.go +++ b/api/golang/core/lib/services/container_config.go @@ -34,7 +34,7 @@ type ContainerConfig struct { image string usedPorts map[string]*PortSpec publicPorts map[string]*PortSpec //TODO this is a huge hack to temporarily enable static ports for NEAR until we have a more productized solution - filesArtifactMountpoints map[FilesArtifactUUID]string + filesArtifactMountpoints map[string]FilesArtifactUUID entrypointOverrideArgs []string cmdOverrideArgs []string environmentVariableOverrides map[string]string @@ -51,7 +51,7 @@ func (config *ContainerConfig) GetUsedPorts() map[string]*PortSpec { return config.usedPorts } -func (config *ContainerConfig) GetFilesArtifactMountpoints() map[FilesArtifactUUID]string { +func (config *ContainerConfig) GetFilesArtifactMountpoints() map[string]FilesArtifactUUID { return config.filesArtifactMountpoints } @@ -95,7 +95,7 @@ type ContainerConfigBuilder struct { image string usedPorts map[string]*PortSpec publicPorts map[string]*PortSpec //TODO this is a huge hack to temporarily enable static ports for NEAR until we have a more productized solution - filesArtifactMountpoints map[FilesArtifactUUID]string + filesArtifactMountpoints map[string]FilesArtifactUUID entrypointOverrideArgs []string cmdOverrideArgs []string environmentVariableOverrides map[string]string @@ -109,7 +109,7 @@ func NewContainerConfigBuilder(image string) *ContainerConfigBuilder { image: image, usedPorts: map[string]*PortSpec{}, publicPorts: nil, - filesArtifactMountpoints: map[FilesArtifactUUID]string{}, + filesArtifactMountpoints: map[string]FilesArtifactUUID{}, entrypointOverrideArgs: nil, cmdOverrideArgs: nil, environmentVariableOverrides: map[string]string{}, @@ -124,7 +124,7 @@ func (builder *ContainerConfigBuilder) WithUsedPorts(usedPorts map[string]*PortS return builder } -func (builder *ContainerConfigBuilder) WithFiles(filesArtifactMountpoints map[FilesArtifactUUID]string) *ContainerConfigBuilder { +func (builder *ContainerConfigBuilder) WithFiles(filesArtifactMountpoints map[string]FilesArtifactUUID) *ContainerConfigBuilder { builder.filesArtifactMountpoints = filesArtifactMountpoints return builder } diff --git a/api/golang/core/lib/services/service_config_builder.go b/api/golang/core/lib/services/service_config_builder.go index 32f7644..a74db25 100644 --- a/api/golang/core/lib/services/service_config_builder.go +++ b/api/golang/core/lib/services/service_config_builder.go @@ -78,7 +78,9 @@ func (builder *ServiceConfigBuilder) WithPrivateIPAddressPlaceholder(privateIPAd } func (builder *ServiceConfigBuilder) WithSubnetwork(subnetwork string) *ServiceConfigBuilder { - builder.subnetwork = subnetwork + if subnetwork != "" { + builder.subnetwork = subnetwork + } return builder } diff --git a/api/golang/kurtosis_version/kurtosis_version.go b/api/golang/kurtosis_version/kurtosis_version.go index d44d98d..d57d8e2 100644 --- a/api/golang/kurtosis_version/kurtosis_version.go +++ b/api/golang/kurtosis_version/kurtosis_version.go @@ -9,6 +9,6 @@ const ( // !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!! // This is necessary so that Kurt Core consumers (e.g. modules) will know if they're compatible with the currently-running // API container - KurtosisVersion = "0.61.0" + KurtosisVersion = "0.62.0" // !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!! ) diff --git a/api/typescript/package.json b/api/typescript/package.json index a188365..56cedfd 100644 --- a/api/typescript/package.json +++ b/api/typescript/package.json @@ -1,7 +1,7 @@ { "name": "kurtosis-sdk", "//": "NOTE: DO NOT UPDATE THIS VERSION MANUALLY - IT WILL BE UPDATED DURING THE RELEASE PROCESS!", - "version": "0.61.0", + "version": "0.62.0", "main": "./build/index", "description": "This repo contains a Typescript client for communicating with the Kurtosis Engine server, which is responsible for creating, managing and destroying Kurtosis Enclaves.", "types": "./build/index", diff --git a/api/typescript/src/core/lib/enclaves/enclave_context.ts b/api/typescript/src/core/lib/enclaves/enclave_context.ts index 0a6524e..8dce8da 100644 --- a/api/typescript/src/core/lib/enclaves/enclave_context.ts +++ b/api/typescript/src/core/lib/enclaves/enclave_context.ts @@ -395,8 +395,8 @@ export class EnclaveContext { for (const [serviceID, containerConfig] of containerConfigs.entries()) { log.trace(`Creating files artifact ID str -> mount dirpaths map for service with Id '${serviceID}'...`); const artifactIdStrToMountDirpath: Map = new Map(); - for (const [filesArtifactId, mountDirpath] of containerConfig.filesArtifactMountpoints) { - artifactIdStrToMountDirpath.set(filesArtifactId, mountDirpath); + for (const [mountDirpath, filesArtifactId] of containerConfig.filesArtifactMountpoints) { + artifactIdStrToMountDirpath.set(mountDirpath, filesArtifactId); } log.trace(`Successfully created files artifact ID str -> mount dirpaths map for service with Id '${serviceID}'`); diff --git a/api/typescript/src/core/lib/enclaves/starlark_run_blocking.ts b/api/typescript/src/core/lib/enclaves/starlark_run_blocking.ts index 573d537..2d46353 100644 --- a/api/typescript/src/core/lib/enclaves/starlark_run_blocking.ts +++ b/api/typescript/src/core/lib/enclaves/starlark_run_blocking.ts @@ -34,7 +34,7 @@ export async function readStreamContentUntilClosed(responseLines: Readable): Pro if (responseLine.getError()?.getInterpretationError() !== undefined) { interpretationError = responseLine.getError()?.getInterpretationError() } else if (responseLine.getError()?.getValidationError() !== undefined) { - validationErrors.push(responseLine.getError()!.getInterpretationError()!) + validationErrors.push(responseLine.getError()!.getValidationError()!) } else if (responseLine.getError()?.getExecutionError() !== undefined) { executionError = responseLine.getError()?.getExecutionError() } diff --git a/api/typescript/src/core/lib/services/container_config.ts b/api/typescript/src/core/lib/services/container_config.ts index f68e966..775e228 100644 --- a/api/typescript/src/core/lib/services/container_config.ts +++ b/api/typescript/src/core/lib/services/container_config.ts @@ -15,7 +15,7 @@ export class ContainerConfig { public readonly image: string, public readonly usedPorts: Map, public readonly publicPorts: Map, //TODO this is a huge hack to temporarily enable static ports for NEAR until we have a more productized solution - public readonly filesArtifactMountpoints: Map, + public readonly filesArtifactMountpoints: Map, public readonly entrypointOverrideArgs: string[], public readonly cmdOverrideArgs: string[], public readonly environmentVariableOverrides: Map, @@ -36,7 +36,7 @@ export class ContainerConfigBuilder { private readonly image: string; private usedPorts: Map; private publicPorts: Map; //TODO this is a huge hack to temporarily enable static ports for NEAR until we have a more productized solution - private filesArtifactMountpoints: Map; + private filesArtifactMountpoints: Map; private entrypointOverrideArgs: string[]; private cmdOverrideArgs: string[]; private environmentVariableOverrides: Map; @@ -62,7 +62,7 @@ export class ContainerConfigBuilder { return this; } - public withFiles(filesArtifactMountpoints: Map): ContainerConfigBuilder { + public withFiles(filesArtifactMountpoints: Map): ContainerConfigBuilder { this.filesArtifactMountpoints = filesArtifactMountpoints; return this; } diff --git a/api/typescript/src/kurtosis_version/kurtosis_version.ts b/api/typescript/src/kurtosis_version/kurtosis_version.ts index 6983f71..135d982 100644 --- a/api/typescript/src/kurtosis_version/kurtosis_version.ts +++ b/api/typescript/src/kurtosis_version/kurtosis_version.ts @@ -1,5 +1,5 @@ // !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!! // This is necessary so that Kurt Core consumers (e.g. modules) will know if they're compatible with the currently-running // API container -export const KURTOSIS_VERSION: string = "0.61.0" +export const KURTOSIS_VERSION: string = "0.62.0" // !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!