Skip to content

Commit

Permalink
Merge branch 'gmarchetti/revamp-quickstart' of github.com:kurtosis-te…
Browse files Browse the repository at this point in the history
…ch/kurtosis into gmarchetti/revamp-quickstart
  • Loading branch information
galenmarchetti committed Nov 17, 2023
2 parents dd23ca0 + 74e4b7d commit b485fd1
Show file tree
Hide file tree
Showing 52 changed files with 464 additions and 263 deletions.
42 changes: 0 additions & 42 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@ parameters:
file-artifacts-expander-image-filename:
type: string
default: "file-artifacts-expander-image.tgz"
enclave-manager-yarn-cache-key-prefix:
type: string
default: "enclave-manager_yarn"
engine-server-image-filename:
type: string
default: "engine-server-image.tgz"
Expand Down Expand Up @@ -397,33 +394,6 @@ jobs:
paths:
- "<< pipeline.parameters.core-server-image-filename >>"

build_enclave_manager_webapp:
executor: ubuntu_vm
steps:
- checkout

- <<: *abort_job_if_only_docs_changes

# Cache our dependencies
- restore_cache:
keys:
- << pipeline.parameters.enclave-manager-yarn-cache-key-prefix>>-{{ checksum "enclave-manager/api/typescript/yarn.lock" }}-{{ checksum "enclave-manager/web/yarn.lock" }}

- run: npm install -g yarn

- run: |
enclave-manager/scripts/build.sh
- save_cache:
key: << pipeline.parameters.enclave-manager-yarn-cache-key-prefix>>-{{ checksum "enclave-manager/api/typescript/yarn.lock" }}-{{ checksum "enclave-manager/web/yarn.lock" }}
paths:
- "/home/circleci/.cache/yarn"

- persist_to_workspace:
root: engine/server
paths:
- webapp

build_engine_launcher:
docker:
- image: "cimg/go:<< pipeline.parameters.go-version >>"
Expand All @@ -446,11 +416,6 @@ jobs:

- <<: *abort_job_if_only_docs_changes

- attach_workspace:
at: "<< pipeline.parameters.workspace-with-cli-binary-and-images-mountpoint >>"

- run: cp -R << pipeline.parameters.workspace-with-cli-binary-and-images-mountpoint >>/webapp engine/server/webapp

# Generate Kurtosis Version
- run: "<<pipeline.parameters.generate-kurtosis-version-script-path>>"

Expand Down Expand Up @@ -1270,11 +1235,6 @@ workflows:
ignore:
- main

- build_enclave_manager_webapp:
filters:
branches:
ignore:
- main
- build_engine_launcher:
filters:
branches:
Expand All @@ -1283,8 +1243,6 @@ workflows:
- build_engine_server:
context:
- docker-user
requires:
- build_enclave_manager_webapp
filters:
branches:
ignore:
Expand Down
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Changelog

## [0.85.29](https://github.com/kurtosis-tech/kurtosis/compare/0.85.28...0.85.29) (2023-11-17)


### Bug Fixes

* check if record is empty ([#1819](https://github.com/kurtosis-tech/kurtosis/issues/1819)) ([392d47b](https://github.com/kurtosis-tech/kurtosis/commit/392d47b7962c9376551da2e0af3ddb32a304cb20))

## [0.85.28](https://github.com/kurtosis-tech/kurtosis/compare/0.85.27...0.85.28) (2023-11-16)


### Bug Fixes

* update emui build ([#1814](https://github.com/kurtosis-tech/kurtosis/issues/1814)) ([39d2285](https://github.com/kurtosis-tech/kurtosis/commit/39d228528c61b07827f12280cc3f5e7af4aa16fa))

## [0.85.27](https://github.com/kurtosis-tech/kurtosis/compare/0.85.26...0.85.27) (2023-11-16)


### Bug Fixes

* allow building webapp on main ([#1811](https://github.com/kurtosis-tech/kurtosis/issues/1811)) ([1410445](https://github.com/kurtosis-tech/kurtosis/commit/1410445099683124358bd6fe0a012cdecf93e209))

## [0.85.26](https://github.com/kurtosis-tech/kurtosis/compare/0.85.25...0.85.26) (2023-11-16)


### Features

* emui improvements ([#1808](https://github.com/kurtosis-tech/kurtosis/issues/1808)) ([4e77667](https://github.com/kurtosis-tech/kurtosis/commit/4e776673fc017a8e2d44f138aa67f057f524ff58))

## [0.85.25](https://github.com/kurtosis-tech/kurtosis/compare/0.85.24...0.85.25) (2023-11-16)


### Bug Fixes

* display create enclave error in scrollable box ([#1802](https://github.com/kurtosis-tech/kurtosis/issues/1802)) ([21adc5d](https://github.com/kurtosis-tech/kurtosis/commit/21adc5d70575b0d59980367146a528d1cfe137dc))

## [0.85.24](https://github.com/kurtosis-tech/kurtosis/compare/0.85.23...0.85.24) (2023-11-16)


### Features

* generate enclave manager ui in build process and check prettier ([#1717](https://github.com/kurtosis-tech/kurtosis/issues/1717)) ([d6be248](https://github.com/kurtosis-tech/kurtosis/commit/d6be2482cc1af81830e909b8fdbaca104a7b73c3))

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


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.23
Licensed Work: Kurtosis 0.85.29
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-15
Change Date: 2027-11-17

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.23"
KurtosisVersion = "0.85.29"
// !!!!!!!!!!! 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.23"
version = "0.85.29"
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.23",
"version": "0.85.29",
"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.23"
export const KURTOSIS_VERSION: string = "0.85.29"
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,12 @@ func (backend *DockerKurtosisBackend) CreateAPIContainer(
).WithRestartPolicy(docker_manager.RestartOnFailure).Build()

if _, err = backend.dockerManager.FetchImageIfMissing(ctx, image); err != nil {
logrus.Warnf("Failed to pull the latest version of API container image '%v'; you may be running an out-of-date version", image)
logrus.Warnf("Failed to pull the latest version of API container image '%v'; you may be running an out-of-date version. Error:\n%v", image, err)
}

containerId, hostMachinePortBindings, err := backend.dockerManager.CreateAndStartContainer(ctx, createAndStartArgs)
if err != nil {
logrus.Debugf("Error occurred starting the API container. Err:\n%v", err)
return nil, stacktrace.Propagate(err, "An error occurred starting the API container")
}
shouldKillContainer := true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ func (manager *DockerManager) CreateAndStartContainer(

_, _, err := manager.FetchImage(ctx, dockerImage, args.imageDownloadMode)
if err != nil {
logrus.Debugf("Error occurred fetching image '%v'. Err:\n%v", dockerImage, err)
return "", nil, stacktrace.Propagate(err, "An error occurred fetching image '%v'", dockerImage)
}

Expand Down
28 changes: 0 additions & 28 deletions enclave-manager/scripts/build.sh

This file was deleted.

12 changes: 0 additions & 12 deletions enclave-manager/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn prettier`

Runs `prettier --check` to check that the code matches the formatting that [`prettier`](https://prettier.io/) would apply.

### `yarn prettier:fix`

Applies any formatting changes prettier wants to apply to this application. For ease of use you can use IDE integrations
to auto apply prettier changes on file save, see instructions:

- [Here](https://plugins.jetbrains.com/plugin/10456-prettier) for Intellij
- [Here](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for vscode

### `yarn eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
Expand Down
2 changes: 1 addition & 1 deletion enclave-manager/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
},
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
"prebuild": "rm -rf ../../engine/server/webapp",
"clean": "rm -rf build",
"cleanInstall": "rm -rf node_modules; yarn install",
"start": "react-scripts start",
"start:prod": "serve -s build",
"prebuild": "rm -rf ../../engine/server/webapp",
"build": "react-scripts build",
"postbuild": "cp -r build/ ../../engine/server/webapp",
"prettier": "prettier . --check",
Expand Down
1 change: 0 additions & 1 deletion enclave-manager/web/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ lang_root_dirpath="$(dirname "${script_dirpath}")"
# ==================================================================================================
cd "${lang_root_dirpath}"
yarn install --frozen-lockfile
yarn prettier
# There are no unit tests currently
# CGO_ENABLED=0 yarn test
yarn clean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createConnectTransport } from "@connectrpc/connect-web";
import { asyncResult } from "../../utils";
import { KURTOSIS_PACKAGE_INDEXER_URL } from "../constants";
import { KurtosisPackageIndexer } from "./api/kurtosis_package_indexer_connect";
import { ReadPackageRequest } from "./api/kurtosis_package_indexer_pb";
import { PackageRepository, ReadPackageRequest } from "./api/kurtosis_package_indexer_pb";

export class KurtosisPackageIndexerClient {
private client: PromiseClient<typeof KurtosisPackageIndexer>;
Expand All @@ -21,25 +21,25 @@ export class KurtosisPackageIndexerClient {
});
};

parsePackageUrl(packageUrl: string) {
const components = packageUrl.split("/");
if (components.length < 3) {
throw Error(`Illegal url, invalid number of components: ${packageUrl}`);
}
if (components[1].length < 1 || components[2].length < 1) {
throw Error(`Illegal url, empty components: ${packageUrl}`);
}
return new PackageRepository({
baseUrl: "github.com",
owner: components[1],
name: components[2],
rootPath: components.filter((v, i) => i > 2 && v.length > 0).join("/") + "/",
});
}

readPackage = async (packageUrl: string) => {
return asyncResult(() => {
const components = packageUrl.split("/");
if (components.length < 3) {
throw Error(`Illegal url, invalid number of components: ${packageUrl}`);
}
if (components[1].length < 1 || components[2].length < 1) {
throw Error(`Illegal url, empty components: ${packageUrl}`);
}
return this.client.readPackage(
new ReadPackageRequest({
repositoryMetadata: {
baseUrl: "github.com",
owner: components[1],
name: components[2],
rootPath: components.filter((v, i) => i > 2 && v.length > 0).join("/") + "/",
},
}),
);
return this.client.readPackage(new ReadPackageRequest({ repositoryMetadata: this.parsePackageUrl(packageUrl) }));
});
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ export const KurtosisPackageIndexer = {
O: ReadPackageResponse,
kind: MethodKind.Unary,
},
},
}
} as const;

Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ export class PackageArg extends Message<PackageArg> {
*/
typeV2?: PackageArgumentType;

/**
* @generated from field: optional string defaultValue = 6;
*/
defaultValue?: string;

constructor(data?: PartialMessage<PackageArg>) {
super();
proto3.util.initPartial(data, this);
Expand All @@ -296,6 +301,7 @@ export class PackageArg extends Message<PackageArg> {
{ no: 2, name: "is_required", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 4, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "typeV2", kind: "message", T: PackageArgumentType },
{ no: 6, name: "defaultValue", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PackageArg {
Expand Down
2 changes: 1 addition & 1 deletion enclave-manager/web/src/components/FormatDateTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const FormatDateTime = ({ dateTime, format, ...textProps }: FormatDateTim
}

return (
<Tooltip label={dateTime.toISO()}>
<Tooltip label={dateTime.toLocal().toFormat("yyyy-MM-dd HH:mm:ss ZZZZ")}>
<Text as={"span"} {...textProps}>
{formattedDateTime}
</Text>
Expand Down
6 changes: 4 additions & 2 deletions enclave-manager/web/src/components/KurtosisAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type KurtosisAlertProps = AlertProps & {

export const KurtosisAlert = ({ message, details, ...alertProps }: KurtosisAlertProps) => {
return (
<Alert status="error" {...alertProps}>
<Alert status="error" overflowY={"auto"} maxHeight={"300px"} alignItems={"flex-start"} {...alertProps}>
<AlertIcon />
<Flex flexDirection={"column"} width={"100%"} gap={"8px"}>
<Flex direction={"row"}>
Expand All @@ -40,7 +40,9 @@ export const KurtosisAlert = ({ message, details, ...alertProps }: KurtosisAlert
</AccordionButton>
</h2>
<AccordionPanel pb={4}>
<Box as={"pre"}>{details}</Box>
<Box as={"pre"} whiteSpace={"pre-wrap"} wordBreak={"break-word"}>
{details}
</Box>
</AccordionPanel>
</AccordionItem>
</Accordion>
Expand Down
Loading

0 comments on commit b485fd1

Please sign in to comment.