holdenk opened a new pull request, #60471:
URL: https://github.com/apache/spark/pull/60471

   [SPARK-59791][BUILD] Add optional pre-push checks to the merge script's 
backports
   
   ### What changes were proposed in this pull request?
   
   Every backport cherry-pick in `dev/merge_spark_pr.py` can now run two 
optional checks before the push prompt. Declining either skips just that 
branch. They apply only to cherry-picks: a PR opened straight against a 
maintenance branch already ran that branch's CI.
   
   1. **Clean compile smoke test** (`maybe_compile_check`): `build/sbt -Phive 
;clean;compile;Test/compile` on the checked-out pick. It catches mis-resolved 
conflicts and PRs that bit-rotted against the target branch. It is not CI: only 
the default modules plus Hive get compiled, because the full CI profile list 
includes flaky ones. `-Phive` is not optional: with no `-P` at all, SparkBuild 
falls back to the `sbt` profile, which puts guava and pmml-model on every 
compile classpath and turns CI failures into local passes. A red build asks 
before continuing rather than aborting, since a non-zero sbt is as easily a JDK 
or a download failure as the backport.
   2. **Pre-4.2 `ConfigBindingPolicy` warning** 
(`maybe_binding_policy_warning`): a pick onto `branch-4.1`/`4.0`/`3.x` that 
adds `.withBindingPolicy(...)` or `ConfigBindingPolicy` (the API arrived in 
SPARK-55928) will not compile there. The check is a plain `git diff` over 
Scala/Java sources scanned for added lines. A git failure only warns.
   
   `continue_maybe(cherry=True)` now aborts only when a cherry-pick is actually 
in progress, since these checks run after the pick is committed.
   
   ### Why are the changes needed?
   
   We run more and more backports, and a bad conflict resolution or a 4.2+ API 
leaking into an older branch otherwise only shows up in CI after the push.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Committer-facing dev tool only.
   
   ### How was this patch tested?
   
   `python3 -m doctest dev/merge_spark_pr.py` and `ruff check` / `ruff format`. 
Used to merge https://github.com/apache/spark/pull/58901 and 
https://github.com/apache/spark/pull/57873.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code
   
   
   This supersedes the checks half of #59899.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to