diff --git a/CHANGELOG.md b/CHANGELOG.md index 664764c6f0..4c4a062cb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [0.86.18](https://github.com/kurtosis-tech/kurtosis/compare/0.86.17...0.86.18) (2024-02-09) + + +### Features + +* add files in enclave dump ([#2136](https://github.com/kurtosis-tech/kurtosis/issues/2136)) ([0525d9f](https://github.com/kurtosis-tech/kurtosis/commit/0525d9fbb12561cf4b5a83814baf05d8d1682274)) + + +### Bug Fixes + +* node selector validation ([#2141](https://github.com/kurtosis-tech/kurtosis/issues/2141)) ([0fee848](https://github.com/kurtosis-tech/kurtosis/commit/0fee84881f83d0b5a911f511a9fcdd889a0b8784)) + ## [0.86.17](https://github.com/kurtosis-tech/kurtosis/compare/0.86.16...0.86.17) (2024-02-08) diff --git a/LICENSE.md b/LICENSE.md index 59c149646a..1693a875c0 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -3,7 +3,7 @@ Business Source License 1.1 Parameters Licensor: Kurtosis Technologies, Inc. -Licensed Work: Kurtosis 0.86.17 +Licensed Work: Kurtosis 0.86.18 The Licensed Work is (c) 2024 Kurtosis Technologies, Inc. Additional Use Grant: You may make use of the Licensed Work, provided that you may not use the Licensed Work for an Environment Orchestration Service. @@ -12,7 +12,7 @@ you may not use the Licensed Work for an Environment Orchestration Service. allows third parties (other than your employees and contractors) to create distributed system environments. -Change Date: 2028-02-08 +Change Date: 2028-02-09 Change License: Apache 2.0 (Apache License, Version 2.0) diff --git a/api/golang/kurtosis_version/kurtosis_version.go b/api/golang/kurtosis_version/kurtosis_version.go index 45956baff8..f870cac450 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 will know if they're compatible with the currently-running // API container - KurtosisVersion = "0.86.17" + KurtosisVersion = "0.86.18" // !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!! ) diff --git a/api/rust/Cargo.toml b/api/rust/Cargo.toml index c079148259..1581d12f22 100644 --- a/api/rust/Cargo.toml +++ b/api/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kurtosis-sdk" -version = "0.86.17" +version = "0.86.18" license = "BUSL-1.1" description = "Rust SDK for Kurtosis" edition = "2021" diff --git a/api/typescript/package.json b/api/typescript/package.json index f157bc0cbc..597cb6c063 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.86.17", + "version": "0.86.18", "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/kurtosis_version/kurtosis_version.ts b/api/typescript/src/kurtosis_version/kurtosis_version.ts index ce129bfc50..52b851d843 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.86.17" +export const KURTOSIS_VERSION: string = "0.86.18" // !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!! diff --git a/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/builtin_argument/validators.go b/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/builtin_argument/validators.go index e7ed82a66c..38ea311887 100644 --- a/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/builtin_argument/validators.go +++ b/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/builtin_argument/validators.go @@ -148,31 +148,46 @@ func DurationOrNone(value starlark.Value, attributeName string) *startosis_error } func StringMappingToString(value starlark.Value, attributeName string) *startosis_errors.InterpretationError { - labelsMap := map[string]string{} - labelsDict, ok := value.(*starlark.Dict) + if _, err := parseMapStringString(value, attributeName); err != nil { + return err + } + return nil +} + +func ServiceLabelsValidator(value starlark.Value, attributeName string) *startosis_errors.InterpretationError { + labelsMap, interpretationErr := parseMapStringString(value, attributeName) + if interpretationErr != nil { + return interpretationErr + } + if err := service.ValidateServiceConfigLabels(labelsMap); err != nil { + return startosis_errors.WrapWithInterpretationError(err, "An error occurred validating service config labels '%+v'", labelsMap) + } + return nil +} + +func parseMapStringString(value starlark.Value, attributeName string) (map[string]string, *startosis_errors.InterpretationError) { + stringMap := map[string]string{} + stringDict, ok := value.(*starlark.Dict) if !ok { - return startosis_errors.NewInterpretationError("Attribute '%s' is expected to be a dictionary of strings, got '%s'", attributeName, reflect.TypeOf(value)) + return nil, startosis_errors.NewInterpretationError("Attribute '%s' is expected to be a dictionary of strings, got '%s'", attributeName, reflect.TypeOf(value)) } - for _, labelKey := range labelsDict.Keys() { - labelValue, found, err := labelsDict.Get(labelKey) + for _, mapKey := range stringDict.Keys() { + mapValue, found, err := stringDict.Get(mapKey) if err != nil { - return startosis_errors.WrapWithInterpretationError(err, "Unexpected error iterating on dictionary. Value associated to key '%v' could not be found", labelKey) + return nil, startosis_errors.WrapWithInterpretationError(err, "Unexpected error iterating on dictionary. Value associated to key '%v' could not be found", mapKey) } else if !found { - return startosis_errors.NewInterpretationError("Unexpected error iterating on dictionary. Value associated to key '%v' could not be found", labelKey) + return nil, startosis_errors.NewInterpretationError("Unexpected error iterating on dictionary. Value associated to key '%v' could not be found", mapKey) } - labelKeyStr, ok := labelKey.(starlark.String) + mapKeyStr, ok := mapKey.(starlark.String) if !ok { - return startosis_errors.NewInterpretationError("Key in '%s' dictionary was expected to be a string, got '%s'", attributeName, reflect.TypeOf(labelKey)) + return nil, startosis_errors.NewInterpretationError("Key in '%s' dictionary was expected to be a string, got '%s'", attributeName, reflect.TypeOf(mapKey)) } - labelValueStr, ok := labelValue.(starlark.String) + mapValueStr, ok := mapValue.(starlark.String) if !ok { - return startosis_errors.NewInterpretationError("Value associated to key '%s' in dictionary '%s' was expected to be a string, got '%s'", labelKeyStr, attributeName, reflect.TypeOf(value)) + return nil, startosis_errors.NewInterpretationError("Value associated to key '%s' in dictionary '%s' was expected to be a string, got '%s'", mapKeyStr, attributeName, reflect.TypeOf(value)) } - labelsMap[labelKeyStr.GoString()] = labelValueStr.GoString() + stringMap[mapKeyStr.GoString()] = mapValueStr.GoString() } - if err := service.ValidateServiceConfigLabels(labelsMap); err != nil { - return startosis_errors.WrapWithInterpretationError(err, "An error occurred validating service config labels '%+v'", labelsMap) - } - return nil + return stringMap, nil } diff --git a/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/test_engine/static_constants.go b/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/test_engine/static_constants.go index 607e480d9f..5762674c67 100644 --- a/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/test_engine/static_constants.go +++ b/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/test_engine/static_constants.go @@ -118,8 +118,8 @@ var ( testServiceConfigLabelsKey2: testServiceConfigLabelsValue2, } - testNodeSelectorKey1 = "disktype" - testNodeSelectorValue1 = "ssd" + testNodeSelectorKey1 = "k3s.io/hostname" + testNodeSelectorValue1 = "asrock-berlin-03" testNodeSelectors = map[string]string{ testNodeSelectorKey1: testNodeSelectorValue1, } diff --git a/core/server/api_container/server/startosis_engine/kurtosis_types/service_config/service_config.go b/core/server/api_container/server/startosis_engine/kurtosis_types/service_config/service_config.go index 0ec4b6d8f4..fee15b0221 100644 --- a/core/server/api_container/server/startosis_engine/kurtosis_types/service_config/service_config.go +++ b/core/server/api_container/server/startosis_engine/kurtosis_types/service_config/service_config.go @@ -183,7 +183,8 @@ func NewServiceConfigType() *kurtosis_type_constructor.KurtosisTypeConstructor { IsOptional: true, ZeroValueProvider: builtin_argument.ZeroValueProvider[*starlark.Dict], Validator: func(value starlark.Value) *startosis_errors.InterpretationError { - return builtin_argument.StringMappingToString(value, LabelsAttr) + + return builtin_argument.ServiceLabelsValidator(value, LabelsAttr) }, }, { diff --git a/enclave-manager/web/cypress.config.ts b/enclave-manager/web/cypress.config.ts index c0d7712df5..33076b7561 100644 --- a/enclave-manager/web/cypress.config.ts +++ b/enclave-manager/web/cypress.config.ts @@ -3,6 +3,10 @@ import { defineConfig } from "cypress"; export default defineConfig({ e2e: { defaultCommandTimeout: 20000, + retries: { + runMode: 2, + openMode: 0, + }, setupNodeEvents(on, config) { // implement node event listeners here }, diff --git a/enclave-manager/web/cypress/support/commands.ts b/enclave-manager/web/cypress/support/commands.ts index aa5578694a..d5dada8bc8 100644 --- a/enclave-manager/web/cypress/support/commands.ts +++ b/enclave-manager/web/cypress/support/commands.ts @@ -24,11 +24,11 @@ Cypress.Commands.add("createAndGoToEnclave", (enclaveName: string) => { cy.contains("button", "Run").click(); - cy.url({ timeout: 10 * 1000 }).should("match", /enclave\/[^/]+\/logs/); + cy.url({ timeout: 30 * 1000 }).should("match", /enclave\/[^/]+\/logs/); cy.contains("button", "Edit").should("be.disabled"); - cy.contains("Validating", { timeout: 10 * 1000 }); - cy.contains("Script completed", { timeout: 10 * 1000 }); + cy.contains("Validating", { timeout: 30 * 1000 }); + cy.contains("Script completed", { timeout: 30 * 1000 }); cy.contains("button", "Edit").should("be.enabled"); // Go to the enclave overview diff --git a/enclave-manager/web/lerna.json b/enclave-manager/web/lerna.json index 0ceb9be9c4..f181f8f0fd 100644 --- a/enclave-manager/web/lerna.json +++ b/enclave-manager/web/lerna.json @@ -1,6 +1,6 @@ { "packages": ["packages/*"], - "version": "0.86.17", + "version": "0.86.18", "npmClient": "yarn", "$schema": "node_modules/lerna/schemas/lerna-schema.json", "useNx": false, diff --git a/enclave-manager/web/packages/app/package.json b/enclave-manager/web/packages/app/package.json index df95d7c3d6..a833c6ef80 100644 --- a/enclave-manager/web/packages/app/package.json +++ b/enclave-manager/web/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "@kurtosis/emui-app", - "version": "0.86.17", + "version": "0.86.18", "private": true, "homepage": ".", "dependencies": { @@ -10,7 +10,7 @@ "html-react-parser": "^4.2.2", "js-cookie": "^3.0.5", "kurtosis-cloud-indexer-sdk": "^0.0.2", - "kurtosis-ui-components": "0.86.17", + "kurtosis-ui-components": "0.86.18", "react-error-boundary": "^4.0.11", "react-hook-form": "^7.47.0", "react-mentions": "^4.4.10", diff --git a/enclave-manager/web/packages/app/src/emui/enclaves/components/configuration/utils.ts b/enclave-manager/web/packages/app/src/emui/enclaves/components/configuration/utils.ts index 90ab3d0626..d894ce30c1 100644 --- a/enclave-manager/web/packages/app/src/emui/enclaves/components/configuration/utils.ts +++ b/enclave-manager/web/packages/app/src/emui/enclaves/components/configuration/utils.ts @@ -57,7 +57,7 @@ export function transformFormArgsToKurtosisArgs(data: Record, kurto case ArgumentValueType.LIST: return value.map((v: any) => transformValue(innerValuetype, v)); case ArgumentValueType.BOOL: - return isDefined(value) ? isStringTrue(value) : null; + return isDefined(value) && value !== "" ? isStringTrue(value) : null; case ArgumentValueType.INTEGER: return isNaN(value) || isNaN(parseFloat(value)) ? null : parseFloat(value); case ArgumentValueType.STRING: diff --git a/enclave-manager/web/packages/app/src/emui/enclaves/components/modals/EnclaveBuilderModal.tsx b/enclave-manager/web/packages/app/src/emui/enclaves/components/modals/EnclaveBuilderModal.tsx index 0f91d65241..e95c60672f 100644 --- a/enclave-manager/web/packages/app/src/emui/enclaves/components/modals/EnclaveBuilderModal.tsx +++ b/enclave-manager/web/packages/app/src/emui/enclaves/components/modals/EnclaveBuilderModal.tsx @@ -60,6 +60,7 @@ type EnclaveBuilderModalProps = { export const EnclaveBuilderModal = (props: EnclaveBuilderModalProps) => { const variableContextKey = useRef(0); const [error, setError] = useState(); + const [currentStarlarkPreview, setCurrentStarlarkPreview] = useState(); const { nodes: initialNodes, diff --git a/enclave-manager/web/packages/components/package.json b/enclave-manager/web/packages/components/package.json index 7e08f494e4..694f8a22e4 100644 --- a/enclave-manager/web/packages/components/package.json +++ b/enclave-manager/web/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "kurtosis-ui-components", - "version": "0.86.17", + "version": "0.86.18", "private": false, "main": "build/index", "description": "This repo contains components used by Kurtosis UI applications.", diff --git a/version.txt b/version.txt index 81285ed1aa..7ba9c1f388 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.86.17 +0.86.18