Jason Sun
11/28/2023, 4:19 AMflytectl demo start
and its output is
→ flytectl demo start
INFO[0000] [0] Couldn't find a config file []. Relying on env vars and pflags.
Bootstrapping a brand new Flyte cluster...
Going to use Flyte v1.10.0 release with image cr.flyte.org/flyteorg/flyte-sandbox-bundled:sha-fa49d3bfcdc081328e2f1514fd513ec46fdbf734
Pulling image cr.flyte.org/flyteorg/flyte-sandbox-bundled:sha-fa49d3bfcdc081328e2f1514fd513ec46fdbf734
sha-fa49d3bfcdc081328e2f1514fd513ec46fdbf734: Pulling from flyteorg/flyte-sandbox-bundled
60f6cde338d5: Pull complete
d06791c7889c: Pull complete
e16c15fb07ef: Pull complete
353c3c722b3b: Pull complete
b43b7213dfc9: Pull complete
a68cc7c2ab6d: Pull complete
1bc7f4db6d75: Pull complete
Digest: sha256:71665d019657e9f93585ff21743559006909833a4dac2ff1b616491c2599b815
Status: Downloaded newer image for cr.flyte.org/flyteorg/flyte-sandbox-bundled:sha-fa49d3bfcdc081328e2f1514fd513ec46fdbf734
Starting container...
Waiting for cluster to come up...
Activated context "flyte-sandbox"!
+-----------------------------------------------------+---------------+-----------+
| SERVICE | STATUS | NAMESPACE |
+-----------------------------------------------------+---------------+-----------+
| flyte-sandbox-kubernetes-dashboard-6757db879c-hjzj9 | Running | flyte |
+-----------------------------------------------------+---------------+-----------+
| flyte-sandbox-docker-registry-6ddd797ddb-fnh79 | Running | flyte |
+-----------------------------------------------------+---------------+-----------+
| flyte-sandbox-proxy-d95874857-h7f6c | Running | flyte |
+-----------------------------------------------------+---------------+-----------+
| flyte-sandbox-minio-645c8ddf7c-slqkx | Running | flyte |
+-----------------------------------------------------+---------------+-----------+
| flyte-sandbox-postgresql-0 | Running | flyte |
+-----------------------------------------------------+---------------+-----------+
| flyte-sandbox-buildkit-7d7d55dbb-mjfj2 | Running | flyte |
+-----------------------------------------------------+---------------+-----------+
| flyteagent-7b7f469dbf-tlvr8 | Running | flyte |
+-----------------------------------------------------+---------------+-----------+
| flyte-sandbox-76f7d4c6c9-r2r6p | Running | flyte |
+-----------------------------------------------------+---------------+-----------+
Flyte is ready! Flyte UI is available at <http://localhost:30080/console>
Run the following command to export demo environment variables for accessing flytectl
export FLYTECTL_CONFIG=/home/jassun/.flyte/config-sandbox.yaml
Flyte sandbox ships with a Docker registry. Tag and push custom workflow images to localhost:30000
The Minio API is hosted on localhost:30002. Use <http://localhost:30080/minio/login> for Minio console
Then i ran
pyflyte run --remote example.py training_workflow \
--hyperparameters '{"C": 0.1}'
Then i was able to find the project in localhost:30080. Bot localhost:3000 only shows a blank page as shown in the screenshot. Wondering if i set things up the wrong way. This is my first attempt at flyte codebase...Samhita Alla
Samhita Alla
flytectl demo start
command should also display the UI with flytesnacks project installed by default.Jason Sun
11/28/2023, 11:31 AMYee
Yee
Yee
Yee
Jason Sun
11/28/2023, 3:59 PMmodules by path ../node_modules/ 3.84 MiB 636 modules
modules by path ../packages/console/src/ 1.18 MiB (javascript) 775 bytes (asset) 463 modules
modules by path ../packages/ui-atoms/ 1.34 MiB 360 modules
modules by path ../packages/components/ 1.29 MiB 350 modules
modules by path ../packages/flyte-api/ 92.8 KiB 49 modules
modules by path ../packages/common/src/ 1.56 KiB 4 modules
modules by path ./ 2.8 KiB 2 modules
modules by path ../packages/flyteidl-types/ 2.78 MiB 2 modules
modules by path ../packages/locale/src/*.ts 912 bytes 2 modules
../packages/console/package.json 3.83 KiB [optional] [built] [code generated]
Entrypoint HtmlWebpackPlugin_0-0 =
runtime modules 734 bytes 4 modules
cacheable modules 2.08 KiB
data:text/javascript,__webpack_public.. 77 bytes [built] [code generated]
../node_modules/html-webpack-plugin/lib/loader.js!./src/assets/index.html 2.01 KiB [built] [code generated]
Child HtmlWebpackCompiler compiled successfully
client (webpack 5.88.2) compiled successfully in 45669 ms
server:
asset server.js 4.19 MiB [emitted] (name: main)
runtime modules 23.4 KiB 9 modules
modules by path ../node_modules/ 1.58 MiB
javascript modules 1.32 MiB 202 modules
json modules 262 KiB
modules by path ../node_modules/iconv-lite/ 86.7 KiB 8 modules
+ 3 modules
modules by path ./ 7.28 KiB
modules by path ./src/server/*.ts 5.13 KiB
./src/server/index.ts 3.2 KiB [built] [code generated]
./src/server/router.ts 1 KiB [built] [code generated]
./src/server/plugins.ts 953 bytes [built] [code generated]
./env.js 1.99 KiB [built] [code generated]
./src/server/ sync 160 bytes [built] [code generated]
+ 16 modules
WARNING in ../node_modules/express/lib/view.js 81:13-25
Critical dependency: the request of a dependency is an expression
@ ../node_modules/express/lib/application.js 22:11-28
@ ../node_modules/express/lib/express.js 18:12-36
@ ../node_modules/express/index.js 11:0-41
@ ./src/server/index.ts 11:42-60
WARNING in ./src/server/plugins.ts 9:6-33
Critical dependency: the request of a dependency is an expression
@ ./src/server/index.ts 15:18-38
2 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
server (webpack 5.88.2) compiled with 2 warnings in 10533 ms
Rewriting GET /select-project to /index.html
Rewriting GET /select-project to /index.html
Rewriting GET /select-project to /index.html
Rewriting GET /console/projects to /index.html
Rewriting GET /console/projects/flytesnacks/domains/development/executions/f37821ecb8e494a698c6?duration=all to /index.html
Rewriting GET /console/projects/flytesnacks/domains/development/executions/f37821ecb8e494a698c6?duration=all to /index.html
Rewriting GET /select-project to /index.html
Rewriting GET /console/projects/flytesnacks/domains/development/executions/f37821ecb8e494a698c6?duration=all to /index.html
I did set
export ADMIN_API_URL=<http://localhost:30080>
before yarn start
Jason Sun
11/28/2023, 4:02 PMJason Sun
11/28/2023, 4:12 PMJason Sun
11/28/2023, 4:12 PMJason Sun
11/28/2023, 7:14 PMERROR in ../packages/console/src/routes/constants.ts:1:27
TS2307: Cannot find module '@flyteorg/common' or its corresponding type declarations.
> 1 | import { makeRoute } from '@flyteorg/common';
| ^^^^^^^^^^^^^^^^^^
2 |
3 | const projectPrefix = '/projects/:projectId';
4 |
ERROR in ../packages/console/src/routes/routes.ts:3:27
TS2307: Cannot find module '@flyteorg/common' or its corresponding type declarations.
1 | import { ensureSlashPrefixed } from 'common/utils';
2 | import { WorkflowExecutionIdentifier } from 'models/Execution/types';
> 3 | import { makeRoute } from '@flyteorg/common';
| ^^^^^^^^^^^^^^^^^^
4 | import { projectBasePath, projectDomainBasePath } from './constants';
5 |
It seems like the root cause is that it cannot resolve the module import for @flyteorg/*.
I didn't touch anything in the tsconfig.json file. Wondering if this is a known issue or i set up thing incorrectly.. It's weird since i can build it on my first clone. But all subsequent build code change would fail.
My dev environment:
1. linux centos 7
2. terminal+neovim
I tried
1. add skipLibCheck=true in tsconfig.json in the root dir, but it doesn't work.
2. yarn clean cache and rebuild, it doesn't work.
3. delete the whole project folder and restart my linux vm and reclone / resetup everything, it works on the first build, but subsequent build will fail after code change.
To reproduce:
1. clone the flyte console repo
2. cd flyte-console
3. mkdir pyenv && cd pyenv && python -m venv ./ && pip install flytekit flytekitplugins-deck-standard scikit-learn
4. source ./bin/activate
5. cd ..
6. mkdir test_flows
7. create a file called example.py inside test_flows folder, verbatim from https://docs.flyte.org/projects/cookbook/en/latest/index.html
8. flytectl demo start
9. export ADMIN_API_URL=http://localhost:30080
10. pyflyte run --remote test_flows/example.py training_workflow --hyperparameters '{"C": 0.1}'
11. yarn install
12. yarn build
13. open https://localhost:3000
14. things should work as expected up to this point.
15. change something in the code base, what i did: change package/components/src/components/Executions/Tables/WorkflowExecutionTable/strings.ts: change the duration
name to duratio
16. at this point, it dev server triggers a hot reload. but it will fail because it could'nt find all the @flyteorg/
related imports/type declarations.
@Samhita Alla @Jason Porter cc: @Byron HsuYee
Yee
Jason Sun
11/30/2023, 4:41 PMJason Sun
12/01/2023, 2:26 PMnpm run build:pack
and
npm run build:type
before yarn start so make sure the relevant bindings are there (this step is not described in the README.md and i found it out by reading package.json
in search of clues on what's causing the erro... But all is good now, I can now do hot reload. cc: @Jason Porter @Byron Hsu @Yee