Skip to content

Commit

Permalink
Merge branch 'main' into kevin/docstring-format
Browse files Browse the repository at this point in the history
  • Loading branch information
mieubrisse authored Nov 15, 2023
2 parents 02ae7e9 + 18c8b53 commit f9255b8
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 25 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.85.22](https://github.com/kurtosis-tech/kurtosis/compare/0.85.21...0.85.22) (2023-11-15)


### Features

* configured CORS logs in the enclave manager server inside the Kurtosis engine ([#1797](https://github.com/kurtosis-tech/kurtosis/issues/1797)) ([1eaf469](https://github.com/kurtosis-tech/kurtosis/commit/1eaf469ba0d8d1a742c8bdf544c42e4ff1b17b67))

## [0.85.21](https://github.com/kurtosis-tech/kurtosis/compare/0.85.20...0.85.21) (2023-11-14)


Expand Down
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Business Source License 1.1
Parameters

Licensor: Kurtosis Technologies, Inc.
Licensed Work: Kurtosis 0.85.21
Licensed Work: Kurtosis 0.85.22
The Licensed Work is (c) 2023 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.
Expand All @@ -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: 2027-11-14
Change Date: 2027-11-15

Change License: AGPLv3 (GNU Affero General Public License Version 3)

Expand Down
2 changes: 1 addition & 1 deletion api/golang/kurtosis_version/kurtosis_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.85.21"
KurtosisVersion = "0.85.22"
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
)
2 changes: 1 addition & 1 deletion api/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kurtosis-sdk"
version = "0.85.21"
version = "0.85.22"
license = "BUSL-1.1"
description = "Rust SDK for Kurtosis"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion api/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kurtosis-sdk",
"//": "NOTE: DO NOT UPDATE THIS VERSION MANUALLY - IT WILL BE UPDATED DURING THE RELEASE PROCESS!",
"version": "0.85.21",
"version": "0.85.22",
"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",
Expand Down
2 changes: 1 addition & 1 deletion api/typescript/src/kurtosis_version/kurtosis_version.ts
Original file line number Diff line number Diff line change
@@ -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.85.21"
export const KURTOSIS_VERSION: string = "0.85.22"
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,12 @@ export abstract class KurtosisClient {
this.client = client;
this.cloudUrl = parentUrl;
this.baseApplicationUrl = childUrl;
console.log("cloudUrl", this.cloudUrl);
console.log("baseApplicationUrl", this.baseApplicationUrl);
this.getParentRequestedRoute();
}

getParentRequestedRoute() {
const splits = this.cloudUrl.pathname.split("/enclave-manager");
if (splits[1]) {
console.log("splits ", splits[1]);
return splits[1];
}
return undefined;
Expand Down
1 change: 0 additions & 1 deletion enclave-manager/web/src/components/LocationBroadcaster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const LocationBroadcaster = () => {

useEffect(() => {
const message = { message: "em-ui-location-pathname", value: location.pathname };
console.log("Broadcasting message to parent", message);
// eslint-disable-next-line no-restricted-globals
parent.postMessage(message, "*");
}, [location.pathname]);
Expand Down
1 change: 0 additions & 1 deletion enclave-manager/web/src/components/LocationListener.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export const LocationListener = () => {

useEffect(() => {
if (client.getCloudUrl()) {
console.log(client.getParentRequestedRoute());
const route = client.getParentRequestedRoute();
if (route) navigate(route);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ModalHeader,
ModalOverlay,
Text,
Tooltip,
Tooltip, useToast,
} from "@chakra-ui/react";
import { EnclaveMode } from "enclave-manager-sdk/build/engine_service_pb";
import { useMemo, useRef, useState } from "react";
Expand Down Expand Up @@ -55,6 +55,7 @@ export const ConfigureEnclaveModal = ({
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<string>();
const formRef = useRef<EnclaveConfigurationFormImperativeAttributes>(null);
const toast = useToast();

const initialValues = useMemo(() => {
if (isDefined(existingEnclave) && isDefined(existingEnclave.starlarkRun)) {
Expand Down Expand Up @@ -89,8 +90,10 @@ export const ConfigureEnclaveModal = ({
return isDefined(value)
? Object.entries(value).map(([k, v]) => ({ key: k, value: convertArgValue(innerType2, v) }), {})
: [];
case ArgumentValueType.JSON:
default:
return value;
// By default, a typeless parameter is JSON.
return isDefined(value) ? JSON.stringify(value) : "{}";
}
};

Expand Down Expand Up @@ -129,6 +132,7 @@ export const ConfigureEnclaveModal = ({
try {
parsedForm.args[arg.name] = JSON.stringify(JSON.parse(parsedForm.args[arg.name]), undefined, 4);
} catch (err: any) {
console.error("err", err);
// do nothing, the input was not valid json.
}
}
Expand All @@ -155,6 +159,20 @@ export const ConfigureEnclaveModal = ({
const handleLoadSubmit: SubmitHandler<ConfigureEnclaveForm> = async (formData) => {
setError(undefined);

try {
console.debug("formData", formData);
if (formData.args && formData.args.args) {
formData.args.args = JSON.parse(formData.args.args);
console.debug("successfully parsed args as proper JSON", formData.args.args);
}
} catch (err) {
toast({
title: `An error occurred while preparing data for running package. The package arguments were not proper JSON: ${stringifyError(err)}`,
colorScheme: "red",
});
return;
}

let apicInfo = existingEnclave?.apiContainerInfo;
let enclaveUUID = existingEnclave?.shortenedUuid;
if (!isDefined(existingEnclave)) {
Expand All @@ -179,7 +197,23 @@ export const ConfigureEnclaveModal = ({
return;
}

const logsIterator = await runStarlarkPackage(apicInfo, kurtosisPackage.name, formData.args);
let submissionData = {};
if (formData.args.args) {
const { args, ...rest } = formData.args;
submissionData = {
...args,
...rest,
};
console.debug("formData has `args` field and is merged with other potential args", submissionData);
} else {
submissionData = {
...formData.args,
};
console.debug("formData does not have Args field", submissionData);
}
console.log("submissionData for runStarlarkPackage", submissionData);

const logsIterator = await runStarlarkPackage(apicInfo, kurtosisPackage.name, submissionData);
navigator(`/enclave/${enclaveUUID}/logs`, { state: { logs: logsIterator } });
onClose();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ export const EnclaveLogs = ({ enclave }: EnclaveLogsProps) => {
refreshFilesAndArtifacts(enclave),
]);
}

console.log(line.runResponseLine.value);
}
} catch (error: any) {
if (cancelled) {
Expand Down
6 changes: 3 additions & 3 deletions engine/server/webapp/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"files": {
"main.js": "./static/js/main.30986036.js",
"main.js": "./static/js/main.efcd178a.js",
"index.html": "./index.html",
"main.30986036.js.map": "./static/js/main.30986036.js.map"
"main.efcd178a.js.map": "./static/js/main.efcd178a.js.map"
},
"entrypoints": [
"static/js/main.30986036.js"
"static/js/main.efcd178a.js"
]
}
2 changes: 1 addition & 1 deletion engine/server/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Kurtosis Enclave Manager"/><title>Kurtosis Enclave Manager</title><script defer="defer" src="./static/js/main.30986036.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Kurtosis Enclave Manager"/><title>Kurtosis Enclave Manager</title><script defer="defer" src="./static/js/main.efcd178a.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.85.21
0.85.22

0 comments on commit f9255b8

Please sign in to comment.