Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: revert EM UI build changes #1813

Merged
merged 3 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 9 additions & 55 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 @@ -1103,10 +1068,6 @@ jobs:
version="$(cat version.txt)"
"<<pipeline.parameters.generate-kurtosis-version-script-path>>" $version

- 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

- setup_remote_docker:
version: "<< pipeline.parameters.docker-engine-version>>"
Expand Down Expand Up @@ -1274,9 +1235,6 @@ workflows:
ignore:
- main

# Runs on branches and on main as it's used during publish and during testing
- build_enclave_manager_webapp

- build_engine_launcher:
filters:
branches:
Expand All @@ -1285,8 +1243,6 @@ workflows:
- build_engine_server:
context:
- docker-user
requires:
- build_enclave_manager_webapp
filters:
branches:
ignore:
Expand Down Expand Up @@ -1378,15 +1334,15 @@ workflows:
- build_files_artifacts_expander
<<: *filters_ignore_main

# - test_old_enclave_continuity:
# context:
# - docker-user
# requires:
# - build_cli
# - build_api_container_server
# - build_engine_server
# - build_files_artifacts_expander
# <<: *filters_ignore_main
- test_old_enclave_continuity:
context:
- docker-user
requires:
- build_cli
- build_api_container_server
- build_engine_server
- build_files_artifacts_expander
<<: *filters_ignore_main

# -- Artifact-publishing jobs --------------------------------
- publish_kurtosis_sdk_rust:
Expand Down Expand Up @@ -1431,8 +1387,6 @@ workflows:
context:
- docker-user
- slack-secrets
requires:
- build_enclave_manager_webapp
filters:
branches:
ignore: /.*/
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
5 changes: 2 additions & 3 deletions enclave-manager/web/src/components/LocationListener.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ import { useKurtosisClient } from "../client/enclaveManager/KurtosisClientContex
export const LocationListener = () => {
const client = useKurtosisClient();
const navigate = useNavigate();
const cloudUrl = client.getCloudUrl();

useEffect(() => {
if (cloudUrl) {
if (client.getCloudUrl()) {
const route = client.getParentRequestedRoute();
if (route) navigate(route);
}
}, [cloudUrl, client, navigate]);
}, [client.getCloudUrl()]);

return <></>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import {
ModalHeader,
ModalOverlay,
Text,
Tooltip,
useToast,
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 @@ -81,6 +80,8 @@ export const ConfigureEnclaveModal = ({
return isDefined(value) ? `${value}` : "";
case ArgumentValueType.STRING:
return value || "";
case ArgumentValueType.JSON:
return isDefined(value) ? JSON.stringify(value) : "{}";
case ArgumentValueType.LIST:
assertDefined(innerType1, `Cannot parse a list argument type without knowing innerType1`);
return isDefined(value) ? value.map((v: any) => convertArgValue(innerType1, v)) : [];
Expand Down Expand Up @@ -167,9 +168,7 @@ export const ConfigureEnclaveModal = ({
}
} catch (err) {
toast({
title: `An error occurred while preparing data for running package. The package arguments were not proper JSON: ${stringifyError(
err,
)}`,
title: `An error occurred while preparing data for running package. The package arguments were not proper JSON: ${stringifyError(err)}`,
colorScheme: "red",
});
return;
Expand Down
2 changes: 0 additions & 2 deletions engine/server/.gitignore

This file was deleted.

10 changes: 10 additions & 0 deletions engine/server/webapp/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"files": {
"main.js": "./static/js/main.efcd178a.js",
"index.html": "./index.html",
"main.efcd178a.js.map": "./static/js/main.efcd178a.js.map"
},
"entrypoints": [
"static/js/main.efcd178a.js"
]
}
Binary file added engine/server/webapp/favicon.ico
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions engine/server/webapp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +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.efcd178a.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
Binary file added engine/server/webapp/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions engine/server/webapp/static/js/main.efcd178a.js

Large diffs are not rendered by default.

116 changes: 116 additions & 0 deletions engine/server/webapp/static/js/main.efcd178a.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

/*! streamsaver. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */

/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/

/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @remix-run/router v1.10.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/**
* React Router DOM v6.17.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/**
* React Router v6.17.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/**
* react-table
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/**
* table-core
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
1 change: 1 addition & 0 deletions engine/server/webapp/static/js/main.efcd178a.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ BUILD_SCRIPT_RELATIVE_FILEPATHS=(
"api/scripts/build.sh"
"metrics-library/scripts/build.sh"
"core/scripts/build.sh"
"enclave-manager/scripts/build.sh"
"engine/scripts/build.sh"
"cli/scripts/build.sh"
)
Expand Down
Loading