← Back to Pull requests

MINOR: Keep the Thrift build out of release commits and artifacts #3929

Closed
unknown closed this pull request without merging on Nov 03, 2026 17:32 UTC
View on GitHub
unknown unknown commented on Nov 03, 2026 15:57 UTC
Author

Rationale for this change

The 1.18.2-rc0 source artifacts contain the whole Thrift 0.25.0 source and build tree:

| Artifact | 1.18.1 | 1.18.2-rc0 |
|---|---|---|
| apache-parquet-<v>.tar.gz (dist/dev) | 1.4 MB | 72.6 MB |
| parquet-<v>-source-release.zip (Nexus) | 2.4 MB | 76.6 MB |

Here is how it happened:

1. release-prepare-rc.yml runs dev/ci-before_install.sh ("Install Thrift", added in #3786). That script extracts and builds Thrift in the current directory, which is the checkout being released.
2. prepare-rc.sh stages the version bump with git add -A. The release commit 490699b8 ("Set version to 1.18.2 for release") therefore includes the 18 pom bumps plus 3,550 files under thrift-0.25.0/, including 40 x86-64 ELF .o files. git archive then put them into the source tarball.
3. mvn deploy -Papache-release packages the working tree, not the git tree, into the source-release zip. That zip would contain the Thrift build even if it had never been committed.

The 1.19.0 RCs were not affected only because their version-bump commit (d29073e0, 2026-09-03) predates #3786, and later RCs skipped the bump because the POMs were already at 1.19.0. Every new version prepared through the workflow would hit this.

What changes are included in this PR?

  • dev/ci-before_install.sh: build Thrift in a mktemp -d directory under $RUNNER_TEMP, so it never lands in the checkout. The release workflow runs from master, so this covers releases from every branch. The CI workflows that use the script only need the installed thrift binary.

  • prepare-rc.sh / publish-release.sh: stage version bumps with git add -u. versions:set and versions:set-property only edit tracked POMs.

  • New require_clean_worktree in release/libs/_exec.sh. prepare-rc.sh calls it right before creating the RC tag, so a working tree with uncommitted changes or untracked files fails the run. It is a plain read, not an exec_process call, so it also runs in dry-run mode.
  • I did not add thrift-*/ to .gitignore on purpose: ignored files would pass the clean-tree check but still end up in the source-release zip.

    This PR does not clean up parquet-1.18.x, where 490699b8 is the branch head and still contains thrift-0.25.0/. That will be handled separately before 1.18.2-rc1.

    Are these changes tested?

  • Added bats tests for require_clean_worktree: clean tree, gitignored files, untracked directory, uncommitted change, and running outside a git repository.

  • shellcheck reports no new findings in the changed scripts.

  • Not run end to end. A dry run of the prepare-RC workflow would cover the ci-before_install.sh change.
  • Are there any user-facing changes?

    No. This only changes the release tooling and the CI setup script.

    🤖 Generated with Claude Code

    Diff: 355 lines (+266 / -89) across 4 files Reviewer: RussellSpitzer Review duration: 94m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 355 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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.351
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3929"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    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: 42.5% (MEDIUM) · Higher = larger blast radius
    42.5%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 16.8% · Safe to merge
    16.8%