Skip to content

Commit e4468f6

Browse files
committed
feat: Upgrade Python to 3.12 for CRUD web apps
Upgrade Python toolchain from 3.10 to 3.12 for all three CRUD web applications (Jupyter, Volumes, Tensorboards) and their shared common backend. Changes: - Update Dockerfiles to use python:3.12-slim base image - Add setuptools and wheel installation (required in Python 3.12 slim) - Update CI workflows to use Python 3.12 for testing and linting - Upgrade common backend dependencies to address vulnerabilities: * Flask: 1.1.1 → 2.3.2 * Werkzeug: 0.16.0 → 3.0.6 * requests: 2.22.0 → 2.32.4 * urllib3: 1.25.7 → 2.5.0 * kubernetes: ==22.6.0 → >=22.6.0 Testing performed: - All CI workflows passed (backend unit tests, integration tests, multi-arch builds) - Local functional testing in Kind cluster with full Kubeflow deployment - Verified all three web apps running on Python 3.12 - Tested CRUD operations via UI: * Created, viewed, and deleted Volumes * Created, viewed, and deleted Jupyter Notebooks * Created, viewed, and deleted TensorBoards - Verified namespace visibility and RBAC permissions - Confirmed API endpoints responding correctly - Validated container startup and health checks Closes: #724, #725, #726 Signed-off-by: Asaad Balum <[email protected]>
1 parent 8c44fd7 commit e4468f6

File tree

9 files changed

+32
-26
lines changed

9 files changed

+32
-26
lines changed

.github/workflows/jwa_backend_unittests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- uses: actions/setup-python@v5
2727
with:
28-
python-version: "3.7"
28+
python-version: "3.12"
2929

3030
- name: Setup Python environment
3131
run: |

.github/workflows/python_lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
- name: Checkout source repository
1818
uses: actions/checkout@v4
1919

20-
- name: Set up Python environment 3.8
20+
- name: Set up Python environment 3.12
2121
uses: actions/setup-python@v5
2222
with:
23-
python-version: "3.8"
23+
python-version: "3.12"
2424

2525
- name: flake8 Lint
2626
uses: py-actions/flake8@v2

components/crud-web-apps/common/backend/setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import setuptools
22

33
REQUIRES = [
4-
"Flask >= 1.1.1",
4+
"Flask >= 2.3.2",
55
"Flask-API >= 2.0",
6-
"kubernetes == 22.6.0",
7-
"requests >= 2.22.0",
8-
"urllib3 >= 1.25.7",
9-
"Werkzeug >= 0.16.0",
6+
"kubernetes >= 22.6.0",
7+
"requests >= 2.32.4",
8+
"urllib3 >= 2.5.0",
9+
"Werkzeug >= 3.0.6",
1010
"Flask-Cors >= 3.0.8",
1111
"gevent",
1212
"prometheus-flask-exporter >= 0.23.1",

components/crud-web-apps/jupyter/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# --- Build the backend kubeflow-wheel ---
2-
FROM python:3.10-slim AS backend-kubeflow-wheel
2+
# Python 3.12 upgrade
3+
FROM python:3.12-slim AS backend-kubeflow-wheel
34

45
WORKDIR /src
56

67
COPY ./common/backend/ .
7-
RUN python3 setup.py bdist_wheel
8+
RUN pip install --no-cache-dir setuptools wheel && \
9+
python3 setup.py bdist_wheel
810

911
# --- Build the frontend kubeflow library ---
1012
FROM node:16.20.2-bullseye as frontend-kubeflow-lib
@@ -41,7 +43,7 @@ COPY --from=frontend-kubeflow-lib /src/dist/kubeflow/ ./node_modules/kubeflow/
4143
RUN npm run build -- --output-path=./dist/default --configuration=production
4244

4345
# Web App
44-
FROM python:3.10-slim
46+
FROM python:3.12-slim
4547

4648
WORKDIR /package
4749
COPY --from=backend-kubeflow-wheel /src .

components/crud-web-apps/jupyter/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ with a [configmap](./manifests/base/configs/logos-configmap.yaml) to make it eas
3232

3333
Requirements:
3434
* node 16.20.2
35-
* python 3.8
35+
* python 3.12
3636

3737
### Frontend
3838

@@ -64,8 +64,8 @@ cd components/crud-web-apps/jupyter
6464

6565
# create a virtual env and install deps
6666
# https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
67-
python3.8 -m pip install --user virtualenv
68-
python3.8 -m venv web-apps-dev
67+
python3.12 -m pip install --user virtualenv
68+
python3.12 -m venv web-apps-dev
6969
source web-apps-dev/bin/activate
7070

7171
# install the deps on the activated virtual env

components/crud-web-apps/tensorboards/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# --- Build the backend kubeflow-wheel ---
2-
FROM python:3.10-slim AS backend-kubeflow-wheel
2+
# Python 3.12 upgrade
3+
FROM python:3.12-slim AS backend-kubeflow-wheel
34

45
WORKDIR /src
56

67
COPY ./common/backend/ .
7-
RUN python3 setup.py bdist_wheel
8+
RUN pip install --no-cache-dir setuptools wheel && \
9+
python3 setup.py bdist_wheel
810

911
# --- Build the frontend kubeflow library ---
1012
FROM node:16.20.2-bullseye as frontend-kubeflow-lib
@@ -41,7 +43,7 @@ COPY --from=frontend-kubeflow-lib /src/dist/kubeflow/ ./node_modules/kubeflow/
4143
RUN npm run build -- --output-path=./dist --configuration=production
4244

4345
# Web App
44-
FROM python:3.10-slim
46+
FROM python:3.12-slim
4547

4648
WORKDIR /package
4749
COPY --from=backend-kubeflow-wheel /src .

components/crud-web-apps/tensorboards/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This web app is responsible for allowing the user to manipulate Tensorboard inst
1313

1414
Requirements:
1515
* node 16.20.2
16-
* python 3.8
16+
* python 3.12
1717

1818
### Frontend
1919

@@ -37,8 +37,8 @@ npm run build:watch
3737
# create a virtual env and install deps
3838
# https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
3939
cd component/crud-web-apps/tensorboards/backend
40-
python3.8 -m pip install --user virtualenv
41-
python3.8 -m venv web-apps-dev
40+
python3.12 -m pip install --user virtualenv
41+
python3.12 -m venv web-apps-dev
4242
source web-apps-dev/bin/activate
4343

4444
# install the deps on the activated virtual env

components/crud-web-apps/volumes/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# --- Build the backend kubeflow-wheel ---
2-
FROM python:3.10-slim AS backend-kubeflow-wheel
2+
# Python 3.12 upgrade
3+
FROM python:3.12-slim AS backend-kubeflow-wheel
34

45
WORKDIR /src
56

67
COPY ./common/backend/ .
7-
RUN python3 setup.py bdist_wheel
8+
RUN pip install --no-cache-dir setuptools wheel && \
9+
python3 setup.py bdist_wheel
810

911
# --- Build the frontend kubeflow library ---
1012
FROM node:16.20.2-bullseye as frontend-kubeflow-lib
@@ -41,7 +43,7 @@ COPY --from=frontend-kubeflow-lib /src/dist/kubeflow/ ./node_modules/kubeflow/
4143
RUN npm run build -- --output-path=./dist/default --configuration=production
4244

4345
# Web App
44-
FROM python:3.10-slim
46+
FROM python:3.12-slim
4547

4648
WORKDIR /package
4749
COPY --from=backend-kubeflow-wheel /src .

components/crud-web-apps/volumes/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This web app is responsible for allowing the user to manipulate PVCs in their Ku
66

77
Requirements:
88
* node 16.20.2
9-
* python 3.8
9+
* python 3.12
1010

1111
### Frontend
1212

@@ -30,8 +30,8 @@ npm run build:watch
3030
# create a virtual env and install deps
3131
# https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
3232
cd component/crud-web-apps/volumes/backend
33-
python3.8 -m pip install --user virtualenv
34-
python3.8 -m venv web-apps-dev
33+
python3.12 -m pip install --user virtualenv
34+
python3.12 -m venv web-apps-dev
3535
source web-apps-dev/bin/activate
3636

3737
# install the deps on the activated virtual env

0 commit comments

Comments
 (0)