Skip to content

Conversation

@asaadbalum
Copy link

@asaadbalum asaadbalum commented Nov 18, 2025

Description

Upgrades Python toolchain from 3.10 to 3.12 for all three CRUD web applications (Jupyter, Volumes, Tensorboards) and their shared common backend.

Closes #724, #725, #726

Changes Made

Dockerfiles

  • Updated base image to python:3.12-slim for all three web apps
  • Added explicit setuptools and wheel installation (required in Python 3.12 slim images)
  • Files modified:
    • components/crud-web-apps/jupyter/Dockerfile
    • components/crud-web-apps/volumes/Dockerfile
    • components/crud-web-apps/tensorboards/Dockerfile

CI Workflows

  • Updated Python version to 3.12 in:
    • .github/workflows/jwa_backend_unittests.yaml
    • .github/workflows/python_lint.yaml

Dependencies

Updated components/crud-web-apps/common/backend/setup.py to address security 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

Documentation

  • Updated README files with Python 3.12 build instructions

Testing Performed

✅ CI Workflows (All Passed)

  • JWA Backend Unit Tests
  • Python Linting
  • JWA Integration Test
  • JWA Multi-Arch Build Test
  • VWA Integration Test
  • VWA Multi-Arch Build Test
  • TWA Integration Test
  • TWA Multi-Arch Build Test

✅ Local Functional Testing

Tested in Kind cluster with full Kubeflow deployment:

Infrastructure:

  • Kind cluster with Istio gateway
  • Full Kubeflow manifests applied
  • All three web apps deployed with Python 3.12 images

CRUD Operations Verified:

  • ** For each app:**
    • ✅ Created an instance successfully
    • ✅ Viewed the instance successfully
    • ✅ Deleted the instance successfully

Additional Verification:

  • ✅ API endpoints responding properly
  • ✅ Container health checks passing
  • ✅ Application logs clean (no Python compatibility errors)
  • ✅ All pods running and ready

Acceptance Criteria

  • Docker images build successfully on Python 3.12
  • Backend unit tests pass on Python 3.12
  • Integration tests pass with Python 3.12 images
  • Multi-arch builds (amd64, arm64, ppc64le) complete successfully
  • All files checked for additional Python version dependencies
  • Security vulnerabilities in dependencies addressed
  • Manual functional testing completed

Notes

  • Python 3.12 slim images no longer include setuptools and wheel by default, so explicit installation was added
  • All dependency version constraints were updated to minimum required versions (using ) for better flexibility
  • The kubernetes package constraint was relaxed from ==22.6.0 to ≥22.6.0 to allow compatible updates

@github-project-automation github-project-automation bot moved this to Needs Triage in Kubeflow Notebooks Nov 18, 2025
@google-oss-prow google-oss-prow bot added the area/backend area - related to backend components label Nov 18, 2025
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign thesuperzapper for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot added area/ci area - related to ci area/frontend area - related to frontend components area/v1 area - version - kubeflow notebooks v1 size/M labels Nov 18, 2025
"kubernetes >= 22.6.0",
"requests >= 2.32.4",
"urllib3 >= 2.5.0",
"Werkzeug >= 3.0.6",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current python_requires=">=3.6" is incompatible with the updated dependencies. I checked the actual Python requirements on PyPI:

Dependencies that require Python ≥3.9:

  • urllib3 >= 2.5.0 → requires Python ≥3.9
  • gevent (latest) → requires Python ≥3.9

Dependencies that support Python ≥3.8:

  • Flask >= 2.3.2 → requires Python ≥3.8
  • Werkzeug >= 3.0.6 → requires Python ≥3.8
  • requests >= 2.32.4 → requires Python ≥3.8
  • kubernetes >= 22.6.0 → requires Python ≥3.6

Recommendation:

Since this PR was tested with Python 3.12 and some dependencies require ≥3.9, I suggest:

python_requires=">=3.12", # Tested version, most conservative Or at minimum:

python_requires=">=3.9", # Minimum required by urllib3 2.5.0 and gevent (that is the permissive suggestion).

Also consider removing line 13:

"importlib-metadata >= 1.0;python_version<'3.8'",
This condition will never be true when python_requires is ≥3.9, making it redundant.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great observation, totally agreed and modified, thanks.

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: kubeflow#724, kubeflow#725, kubeflow#726
Signed-off-by: Asaad Balum <[email protected]>
@asaadbalum asaadbalum force-pushed the 724-725-726/python-312-upgrade branch from d0ab7b8 to 54c8fa6 Compare November 19, 2025 13:14
@yehudit1987
Copy link

/lgtm
Thanks Asaad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/backend area - related to backend components area/ci area - related to ci area/frontend area - related to frontend components area/v1 area - version - kubeflow notebooks v1 lgtm size/M

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

2 participants