This is an automated email from the ASF dual-hosted git repository.

dbtsai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark-connect-rust.git


The following commit(s) were added to refs/heads/master by this push:
     new 83e4351  [SPARK-60917][CONNECT][FOLLOWUP] Enforce release wheel build 
contracts
83e4351 is described below

commit 83e435198f0c6ba337c6646cfd87cc5169e0c35b
Author: DB Tsai <[email protected]>
AuthorDate: Fri Nov 6 22:02:41 2026 -0800

    [SPARK-60917][CONNECT][FOLLOWUP] Enforce release wheel build contracts
    
    ### What changes were proposed in this pull request?
    
    Strengthen the shared release wheel recipe by passing `--locked` to Maturin 
and failing artifact upload when no wheel was produced. Constrain Maturin 
installation to `>=1.0,<2.0` in both wheel and sdist jobs, matching the 
existing `pyproject.toml` build-backend requirement, and document these build 
contracts.
    
    Follow-up to #165 and SPARK-60917. This is inherited release hardening; the 
original refactor retained these behaviors.
    
    ### Why are the changes needed?
    
    A manually selected release branch with an inconsistent lockfile can 
otherwise produce a wheel after Cargo silently updates its dependency graph. 
Requiring the checked-in lockfile makes the shared recipe enforce that contract 
independently of prior CI. The Maturin bound keeps direct CLI builds within the 
declared backend range, and an absent wheel should fail the build check instead 
of issuing an upload warning.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No API or runtime change. Release wheel builds now require an up-to-date 
checked-in `Cargo.lock` and a produced wheel.
    
    ### How was this patch tested?
    
    - `actionlint` 1.7.12 passed the shared helper, wheel-check and release 
workflows; shell syntax and whitespace checks passed.
    - `cargo fmt --all --check` passed.
    - Genuine Cargo and Maturin 1.16.0 regression fixtures passed: a valid lock 
builds successfully, a stale lock fails with `--locked` and remains unchanged, 
and the unlocked control builds while rewriting the lockfile. All Cargo/Maturin 
processes used the serialized offline campaign wrapper and private 
tool/cache/target directories.
    - Structural checks verified that both Maturin CLI install ranges match 
`pyproject.toml`, artifact consumers keep their names, and no native/Python API 
or dependency inputs changed. Maturin's supported minimum v1.0.0 forwards 
`--locked` to metadata and compilation.
    - Genuine local Claude Code reviewed the entire follow-up diff after the 
second post-merge review; all findings are assessed in the review evidence.
    
    PR CI on exact head `e5c202bbf00489332d2190204e06b4a14851eab2`: 13 of 15 
checks have passed, including both Linux aarch64 and macOS universal2 project 
wheel builds/uploads, Rust build/tests, WASM UDF tests, rustfmt/Clippy, 
behavioral e2e, coverage, the benchmark, pipelines parity and vendored-file 
checks. The full Connect and pandas parity suites are still running at merge 
preparation; their results are not claimed as passing. The completed checks 
validate the changed wheel-build path [...]
    
    Local repository tests, integration-test compilation with and without 
`wasm-udf`, and Clippy were attempted but stopped before compilation because 
the required offline private cache lacks `prost`; the corresponding completed 
PR CI checks provide the project-level validation. A full four-target release 
dry run and API introspection were not performed. Existing PR #165 CI results 
are historical evidence, not validation of this follow-up.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: OpenAI Codex
    Reviewed-by: Claude Code 2.1.314 (`system.ai.claude-fable-5-1`)
    
    This pull request and its description were written by Isaac.
    
    Closes #293 from dbtsai/codex/postmerge-pr-165-wheel-build-contracts.
    
    Authored-by: DB Tsai <[email protected]>
    Signed-off-by: DB Tsai <[email protected]>
    Co-authored-by: Isaac <[email protected]>
---
 .github/workflows/build-wheel.yml | 5 +++--
 .github/workflows/release.yml     | 2 +-
 dev/design/ci.md                  | 6 ++++++
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/build-wheel.yml 
b/.github/workflows/build-wheel.yml
index 4732427..9a43e2f 100644
--- a/.github/workflows/build-wheel.yml
+++ b/.github/workflows/build-wheel.yml
@@ -104,8 +104,8 @@ jobs:
           WHEEL_TARGET: ${{ inputs.target }}
           WHEEL_USE_ZIG: ${{ inputs.zig }}
         run: |
-          python -m pip install --upgrade maturin
-          args=(--release --out dist --target "$WHEEL_TARGET")
+          python -m pip install --upgrade "maturin>=1.0,<2.0"
+          args=(--release --locked --out dist --target "$WHEEL_TARGET")
           if [[ "$WHEEL_USE_ZIG" == "true" ]]; then
             python -m pip install ziglang
             args+=(--zig)
@@ -115,4 +115,5 @@ jobs:
         with:
           name: wheels-${{ inputs.target }}
           path: dist/*.whl
+          if-no-files-found: error
           retention-days: ${{ inputs.artifact_retention_days }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index b628f49..25b3a5f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -283,7 +283,7 @@ jobs:
           python-version: "3.11"
       - name: Build sdist with maturin
         run: |
-          python -m pip install --upgrade maturin
+          python -m pip install --upgrade "maturin>=1.0,<2.0"
           maturin sdist --out dist
       - name: Verify declared License-File(s) exist in the sdist
         # PyPI (PEP 639) rejects an sdist whose PKG-INFO declares a 
`License-File`
diff --git a/dev/design/ci.md b/dev/design/ci.md
index cf9bd57..d08bf5a 100644
--- a/dev/design/ci.md
+++ b/dev/design/ci.md
@@ -145,6 +145,12 @@ no scheduled backstop for Rust source changes. To validate 
a maintenance branch,
 manually dispatch `release.yml` with `branch` set to that branch, empty
 `release-version` and `rc-count` inputs, and `finalize: false`.
 
+Wheel checks and release wheel builds pass `--locked` to Maturin. The selected
+source branch must contain an up-to-date `Cargo.lock`; repair missing or stale
+lockfiles before dispatching a release. Wheel and sdist recipes install Maturin
+within the `>=1.0,<2.0` range declared in `pyproject.toml`. Wheel artifact 
uploads
+fail if the build produces no wheel.
+
 The shared recipe uses no dependency or build caches, so each run is a clean 
build
 matching the release. Checks have a 45-minute timeout;
 releases retain their six-hour limit. Check artifacts expire after one day;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to