← Back to Pull requests

[CI][python-client] Publish kuberay-client to PyPI #5346

Open
win5923 opened this pull request with 182 lines diff across 28 files
View on GitHub
win5923 win5923 commented on Sep 29, 2026 03:18 UTC
Author

<!-- Thank you for your contribution! -->

<!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. -->

Why are these changes needed?

Today, the only way to use the Python client is to clone this repository and run pip install -e clients/python-client. This PR enables the client to be published to PyPI as kuberay-client.

Rename the distribution package from python-client to kuberay-client and the import package from python_client to kuberay_client, including the source and test directories.
Add a manually triggered release-python-client workflow that builds sdist/wheel artifacts and publishes them to PyPI via PyPI Trusted Publishing.

  • Align package versions with KubeRay releases. Git keeps 0.0.0-dev; the release workflow derives the version from the Git tag at build time (e.g. v1.8.0 → 1.8.0, v1.8.0-rc.0 → 1.8.0rc0).
  • The layout follows the PyPA publishing guide.

    <img width="816" height="177" alt="image" src="https://github.com/user-attachments/assets/9788bde3-6730-40f6-9e6a-085f722ec405" />

    Security

    To prevent users from triggering the release workflow without approval, we should consider enabling Required reviewers for the pypi environment.

    <img width="1040" height="223" alt="image" src="https://github.com/user-attachments/assets/eb6c87b8-34df-4ffe-b38a-8a110a816eaf" />

    Verified on TesyPyPI:

  • Project: https://test.pypi.org/project/kuberay-client/

  • Changes: https://github.com/win5923/kuberay/commit/8453e2e7db3175a12adec8fa39083168de4f47d8

  • Workflow: https://github.com/win5923/kuberay/actions/runs/36513455183
  • <img width="748" height="182" alt="image" src="https://github.com/user-attachments/assets/b54559cf-69d9-4d4a-a50a-387a3c324ed9" />

    Related issue number

    Closes #3915

    Labels

    <!-- Please add the appropriate labels to this PR. -->

  • If this PR has user-facing changes that require documentation updates at release time, I have added the doc-updates-required label.

  • If this PR contains breaking changes, I have added the breaking-change label.
  • Checks

  • I've made sure the tests are passing.

  • Testing Strategy

  • - [x] Unit tests
    - [x] Manual tests
    - [ ] This PR is not tested :(

    <!-- If you selected "Manual tests" above, please fill in the section below. Otherwise you can remove it. -->

    Manual test instructions

    <!--
    Provide step-by-step instructions so reviewers can verify your changes.
    Include any relevant screenshots or logs demonstrating the behavior.
    -->

    Diff: 182 lines (+134 / -48) across 28 files Reviewer: win5923 Review duration: 7908m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.96) × (1 − Review Confidence (0.78)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.96 · 182 lines diff across 28 files
    0.96
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.89 · 2 substantive comment(s)
    0.89
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    77%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.312
    Self Review self_review
    0.140
    Sensitive Paths sensitive_paths
    0.096
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    3 items
    win5923 win5923 commented on code on Sep 29, 2026 14:29 UTC
    Code Review
    docs/development/release.md:1
    @@ -306,3 +308,32 @@ Announce the new release in the [kuberay Slack channel](https://ray.slack.com/ar
     ### Step 10: Update ray.io documentation
     
     Update all references to the KubeRay version in the ray.io documentation.
    +
    +---
    +
    +## Python Client Release
    +
    +The Python client (`clients/python-client`) is published to PyPI as [`kuberay-client`](https://pypi.org/project/kuberay-client/).
    +It is versioned independently of KubeRay and released from the `master` branch when needed, separately from the steps above.

    Should the Python client have its own version bump, or should its version follow the KubeRay repo version?

    win5923 win5923 commented on code on Sep 29, 2026 18:13 UTC
    Code Review
    docs/development/release.md:1
    @@ -306,3 +308,32 @@ Announce the new release in the [kuberay Slack channel](https://ray.slack.com/ar
     ### Step 10: Update ray.io documentation
     
     Update all references to the KubeRay version in the ray.io documentation.
    +
    +---
    +
    +## Python Client Release
    +
    +The Python client (`clients/python-client`) is published to PyPI as [`kuberay-client`](https://pypi.org/project/kuberay-client/).
    +It is versioned independently of KubeRay and released from the `master` branch when needed, separately from the steps above.

    Diiscussed in the KubeRay sync, and agreed that the Python client version will follow the KubeRay repository version.

    Reviewers
    Assignees
    win5923 win5923
    Labels
    risk: low confidence: 77.8% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 96% (HIGH) · Higher = larger blast radius
    96%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 77.8% · Lower = rushed or shallow review
    77.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.3% · Safe to merge
    21.3%