Skip to content

fix(ci): pin kubernetes<36 in github workflow#4

Open
vicoooo26 wants to merge 2 commits into
AliyunContainerService:release-1.9from
vicoooo26:fix/kubernetes-version-pin
Open

fix(ci): pin kubernetes<36 in github workflow#4
vicoooo26 wants to merge 2 commits into
AliyunContainerService:release-1.9from
vicoooo26:fix/kubernetes-version-pin

Conversation

@vicoooo26

@vicoooo26 vicoooo26 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Pin kubernetes<36 in the Python Test CI workflow to fix 13 unit test failures caused by kubernetes 36.0.0 switching to Pydantic models, which breaks the FakeResponse deserialization hack in the SDK unit tests.

Changes

  • Pin kubernetes<36 in .github/workflows install step
  • Add TODO comment documenting the FakeResponse/Pydantic compatibility work needed to remove the pin

Root Cause

kubernetes 36.0.0 (released 2026-05-20) regenerated the synchronous client with the modern OpenAPI Generator python backend, switching all models to Pydantic. This breaks FakeResponse in sdk/python/kubeflow/training/utils/utils.py, which relies on the old ApiClient.deserialize() reading a .data JSON string attribute.

The kubernetes>=27.2.0 constraint in setup.py has no upper bound, so CI installs the latest version. The fork's CI run on 2026-07-14 installed kubernetes 36.0.3, causing 13 tests to fail with RuntimeError. Upstream's run on 2026-04-30 installed kubernetes 35.0.0 and passed.

Only the CI workflow file is modified — no SDK files are touched to avoid impacting release.

Test Plan

  • Pushed to fork and verified Python Test passes on both Python 3.10 and 3.11 (0 failures)
  • Reviewer confirms no SDK files are modified

@github-actions

Copy link
Copy Markdown

🎉 Welcome to the Kubeflow Trainer! 🎉

Thanks for opening your first PR! We're happy to have you as part of our community 🚀

Here's what happens next:

  • If you haven't already, please check out our Contributing Guide for repo-specific guidelines and the Kubeflow Contributor Guide for general community standards.
  • Our team will review your PR soon! cc @kubeflow/kubeflow-trainer-team

Join the community:

Feel free to ask questions in the comments if you need any help or clarification!
Thanks again for contributing to Kubeflow! 🙏

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR stabilizes Python CI by pinning the kubernetes dependency to a pre-36.x version range to avoid known unit test failures introduced by the kubernetes 36.0.0 client’s switch to Pydantic-based models.

Changes:

  • Pin kubernetes<36 in the Python Test workflow dependency install step.
  • Add an in-workflow TODO documenting why the pin exists and what work is needed to remove it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test-python.yaml Outdated
@vicoooo26
vicoooo26 force-pushed the fix/kubernetes-version-pin branch 3 times, most recently from f3cd174 to a52f42a Compare July 24, 2026 10:43
kubernetes 36.0.0 regenerated the sync client with Pydantic models,
breaking the FakeResponse deserialization hack used in SDK unit tests.
Pin kubernetes<36 in all CI workflows that install the Python SDK
(test-python, integration-tests, e2e-test-train-api, test-example-notebooks)
to avoid impacting SDK release. Add a TODO for future Pydantic work.

Signed-off-by: Vico Chu <vico24826@gmail.com>
@vicoooo26
vicoooo26 force-pushed the fix/kubernetes-version-pin branch from a52f42a to c8c1cc0 Compare July 24, 2026 10:46
@vicoooo26 vicoooo26 changed the title fix(ci): pin kubernetes<36 in Python Test workflow fix(ci): pin kubernetes<36 in github workflow Jul 24, 2026
@vicoooo26
vicoooo26 force-pushed the fix/kubernetes-version-pin branch from 2232b90 to 889b982 Compare July 24, 2026 11:45
JAX worker pods were OOMKilled (exit 137) with 3Gi memory limit.
Increase to 5Gi to accommodate XLA compilation and training memory usage.
GitHub-hosted runners have 16GB RAM, so 2 replicas × 5Gi is feasible.

Signed-off-by: Vico Chu <vico24826@gmail.com>
@vicoooo26
vicoooo26 force-pushed the fix/kubernetes-version-pin branch from 889b982 to 82b2b71 Compare July 24, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants