Skip to content

Commit a20bc85

Browse files
authored
[UI] Remove Deprecated Katib UI (#2179)
* [UI] Remove Deprecated Katib UI * Fix UI Developer doc
1 parent 89bd21f commit a20bc85

File tree

328 files changed

+13088
-42272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

328 files changed

+13088
-42272
lines changed

.dockerignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ docs
44
manifests
55
pkg/ui/*/frontend/node_modules
66
pkg/ui/*/frontend/build
7-
pkg/new-ui/*/frontend/node_modules
8-
pkg/new-ui/*/frontend/build

.github/workflows/e2e-test-darts-cifar10.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: E2E Test with darts-cnn-cifar10
33
on:
44
pull_request:
55
paths-ignore:
6-
- "pkg/new-ui/v1beta1/frontend/**"
6+
- "pkg/ui/v1beta1/frontend/**"
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/e2e-test-enas-cifar10.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: E2E Test with enas-cnn-cifar10
33
on:
44
pull_request:
55
paths-ignore:
6-
- "pkg/new-ui/v1beta1/frontend/**"
6+
- "pkg/ui/v1beta1/frontend/**"
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/e2e-test-mxnet-mnist.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: E2E Test with mxnet-mnist
33
on:
44
pull_request:
55
paths-ignore:
6-
- "pkg/new-ui/v1beta1/frontend/**"
6+
- "pkg/ui/v1beta1/frontend/**"
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/e2e-test-pytorch-mnist.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: E2E Test with pytorch-mnist
33
on:
44
pull_request:
55
paths-ignore:
6-
- "pkg/new-ui/v1beta1/frontend/**"
6+
- "pkg/ui/v1beta1/frontend/**"
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/e2e-test-simple-pbt.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: E2E Test with simple-pbt
33
on:
44
pull_request:
55
paths-ignore:
6-
- "pkg/new-ui/v1beta1/frontend/**"
6+
- "pkg/ui/v1beta1/frontend/**"
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/e2e-test-tf-mnist-with-summaries.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: E2E Test with tf-mnist-with-summaries
33
on:
44
pull_request:
55
paths-ignore:
6-
- "pkg/new-ui/v1beta1/frontend/**"
6+
- "pkg/ui/v1beta1/frontend/**"
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/publish-algorithm-images.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
pull_request:
66
paths-ignore:
7-
- "pkg/new-ui/v1beta1/frontend/**"
7+
- "pkg/ui/v1beta1/frontend/**"
88

99
jobs:
1010
algorithm:

.github/workflows/publish-core-images.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- component-name: katib-db-manager
2626
dockerfile: cmd/db-manager/v1beta1/Dockerfile
2727
- component-name: katib-ui
28-
dockerfile: cmd/new-ui/v1beta1/Dockerfile
28+
dockerfile: cmd/ui/v1beta1/Dockerfile
2929
- component-name: cert-generator
3030
dockerfile: cmd/cert-generator/v1beta1/Dockerfile
3131
- component-name: file-metrics-collector

.github/workflows/publish-trial-images.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
pull_request:
66
paths-ignore:
7-
- "pkg/new-ui/v1beta1/frontend/**"
7+
- "pkg/ui/v1beta1/frontend/**"
88

99
jobs:
1010
trial:

.github/workflows/test-go.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Go Test
33
on:
44
pull_request:
55
paths-ignore:
6-
- "pkg/new-ui/v1beta1/frontend/**"
6+
- "pkg/ui/v1beta1/frontend/**"
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/test-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Lint Files
33
on:
44
pull_request:
55
paths-ignore:
6-
- "pkg/new-ui/v1beta1/frontend/**"
6+
- "pkg/ui/v1beta1/frontend/**"
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/test-node.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Frontend Test
33
on:
44
pull_request:
55
paths:
6-
- pkg/new-ui/v1beta1/frontend/**
6+
- pkg/ui/v1beta1/frontend/**
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}
@@ -25,12 +25,12 @@ jobs:
2525

2626
- name: Format katib code
2727
run: |
28-
npm install prettier --prefix ./pkg/new-ui/v1beta1/frontend
28+
npm install prettier --prefix ./pkg/ui/v1beta1/frontend
2929
make prettier-check
3030
3131
- name: Lint katib code
3232
run: |
33-
cd pkg/new-ui/v1beta1/frontend
33+
cd pkg/ui/v1beta1/frontend
3434
npm run lint-check
3535
3636
frontend-unit-tests:
@@ -48,7 +48,7 @@ jobs:
4848

4949
- name: Fetch Kubeflow and install common code dependencies
5050
run: |
51-
COMMIT=$(cat pkg/new-ui/v1beta1/frontend/COMMIT)
51+
COMMIT=$(cat pkg/ui/v1beta1/frontend/COMMIT)
5252
cd /tmp && git clone https://github.com/kubeflow/kubeflow.git
5353
cd kubeflow
5454
git checkout $COMMIT
@@ -59,13 +59,13 @@ jobs:
5959
6060
- name: Install KWA dependencies
6161
run: |
62-
cd pkg/new-ui/v1beta1/frontend
62+
cd pkg/ui/v1beta1/frontend
6363
npm i
6464
npm link kubeflow
6565
6666
- name: Run unit tests
6767
run: |
68-
cd pkg/new-ui/v1beta1/frontend
68+
cd pkg/ui/v1beta1/frontend
6969
npm run test:prod
7070
7171
frontend-ui-tests:
@@ -81,7 +81,7 @@ jobs:
8181

8282
- name: Fetch Kubeflow and install common code dependencies
8383
run: |
84-
COMMIT=$(cat pkg/new-ui/v1beta1/frontend/COMMIT)
84+
COMMIT=$(cat pkg/ui/v1beta1/frontend/COMMIT)
8585
cd /tmp && git clone https://github.com/kubeflow/kubeflow.git
8686
cd kubeflow
8787
git checkout $COMMIT
@@ -91,11 +91,11 @@ jobs:
9191
npm link ./dist/kubeflow
9292
- name: Install KWA dependencies
9393
run: |
94-
cd pkg/new-ui/v1beta1/frontend
94+
cd pkg/ui/v1beta1/frontend
9595
npm i
9696
npm link kubeflow
9797
- name: Serve UI & run Cypress tests in Chrome and Firefox
9898
run: |
99-
cd pkg/new-ui/v1beta1/frontend
99+
cd pkg/ui/v1beta1/frontend
100100
npm run start & npx wait-on http://localhost:4200
101101
npm run ui-test-ci-all

.github/workflows/test-python.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Python Test
33
on:
44
pull_request:
55
paths-ignore:
6-
- "pkg/new-ui/v1beta1/frontend/**"
6+
- "pkg/ui/v1beta1/frontend/**"
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ endif
143143

144144
# Prettier UI format check for Katib v1beta1.
145145
prettier-check:
146-
npm run format:check --prefix pkg/new-ui/v1beta1/frontend
146+
npm run format:check --prefix pkg/ui/v1beta1/frontend
147147

148148
# Update boilerplate for the source code.
149149
update-boilerplate:

cmd/new-ui/v1beta1/Dockerfile

Lines changed: 0 additions & 61 deletions
This file was deleted.

cmd/new-ui/v1beta1/main.go

Lines changed: 0 additions & 76 deletions
This file was deleted.

cmd/ui/v1beta1/Dockerfile

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,40 @@
1-
# Build the Katib UI.
2-
FROM node:12.18.1 AS npm-build
1+
# --- Clone the kubeflow/kubeflow code ---
2+
FROM ubuntu AS fetch-kubeflow-kubeflow
33

4-
# Build frontend.
5-
ADD /pkg/ui/v1beta1/frontend /frontend
6-
RUN cd /frontend && npm ci
7-
RUN cd /frontend && npm run build
8-
RUN rm -rf /frontend/node_modules
4+
RUN apt-get update && apt-get install git -y
95

10-
# Build backend.
6+
WORKDIR /kf
7+
COPY ./pkg/ui/v1beta1/frontend/COMMIT ./
8+
RUN git clone https://github.com/kubeflow/kubeflow.git && \
9+
COMMIT=$(cat ./COMMIT) && \
10+
cd kubeflow && \
11+
git checkout $COMMIT
12+
13+
# --- Build the frontend kubeflow library ---
14+
FROM node:12 AS frontend-kubeflow-lib
15+
16+
WORKDIR /src
17+
18+
ARG LIB=/kf/kubeflow/components/crud-web-apps/common/frontend/kubeflow-common-lib
19+
COPY --from=fetch-kubeflow-kubeflow $LIB/package*.json ./
20+
RUN npm ci
21+
22+
COPY --from=fetch-kubeflow-kubeflow $LIB/ ./
23+
RUN npm run build
24+
25+
# --- Build the frontend ---
26+
FROM node:12 AS frontend
27+
28+
WORKDIR /src
29+
COPY ./pkg/ui/v1beta1/frontend/package*.json ./
30+
RUN npm ci
31+
32+
COPY ./pkg/ui/v1beta1/frontend/ .
33+
COPY --from=frontend-kubeflow-lib /src/dist/kubeflow/ ./node_modules/kubeflow/
34+
35+
RUN npm run build:prod
36+
37+
# --- Build the backend ---
1138
FROM golang:alpine AS go-build
1239

1340
ARG TARGETARCH
@@ -24,11 +51,11 @@ COPY cmd/ cmd/
2451
COPY pkg/ pkg/
2552

2653
# Build the binary.
27-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o katib-ui ./cmd/ui/v1beta1
54+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o katib-ui ./cmd/ui/v1beta1
2855

29-
# Copy the backend and frontend into a thin image.
56+
# --- Compose the web app ---
3057
FROM alpine:3.15
3158
WORKDIR /app
3259
COPY --from=go-build /go/src/github.com/kubeflow/katib/katib-ui /app/
33-
COPY --from=npm-build /frontend/build /app/build
60+
COPY --from=frontend /src/dist/static /app/build/static/
3461
ENTRYPOINT ["./katib-ui"]

0 commit comments

Comments
 (0)