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

zhengruifeng pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-4.x by this push:
     new 269c2fcd0d8d [SPARK-60384][BUILD] Check binary compatibility against 
Spark 4.2.0
269c2fcd0d8d is described below

commit 269c2fcd0d8d8d1b6da11ec68f8ae115b19943c7
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Thu Oct 22 19:00:28 2026 +0800

    [SPARK-60384][BUILD] Check binary compatibility against Spark 4.2.0
    
    ### What changes were proposed in this pull request?
    
    Use Spark 4.2.0 as the previous artifact version for MiMa, and switch 
`GenerateMIMAIgnore`'s class finder from ASM8 to ASM9.
    
    Add four narrow MiMa exclusions for the private 
`ProxyRedirectHandler.MutableFieldsWrapper` and `ResponseWrapper` 
implementation members whose Jetty types are shaded in the published 4.2.0 
artifact.
    
    ### Why are the changes needed?
    
    The 4.0.0 baseline does not comprehensively check released signatures 
introduced in Spark 4.1 and 4.2. Updating the baseline brings those APIs into 
the configured binary-compatibility checks.
    
    The 4.2.0 artifacts also contain sealed interfaces. ASM8 cannot visit their 
`PermittedSubclasses` attribute, so the exclusion scanner must request ASM9.
    
    The first run against 4.2.0 found only four Jetty shading differences in 
explicitly private nested wrapper classes. The added exclusions are limited to 
those private implementation details; existing compatibility exclusions are 
retained.
    
    Please also backport to `branch-4.x` and `branch-4.3`.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No runtime API change. Build-time binary compatibility checks now compare 
against Spark 4.2.0.
    
    ### How was this patch tested?
    
    Ran the standard `dev/mima` pipeline with Java 17. After adding the four 
private Jetty-wrapper exclusions, the pipeline completed successfully, 
including generation of private API exclusions and binary-compatibility checks 
for all configured MiMa projects against 4.2.0.
    
    Also ran `git diff --check` and checked changed Scala lines for ASCII and 
the 100-column limit.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: OpenAI Codex (GPT-6)
    
    Closes #59635 from zhengruifeng/build-mima-baseline-420-dev-5.
    
    Authored-by: Ruifeng Zheng <[email protected]>
    Signed-off-by: Ruifeng Zheng <[email protected]>
    (cherry picked from commit 9cb6933d10f663f30cb254081cb611343952ccfd)
    Signed-off-by: Ruifeng Zheng <[email protected]>
---
 project/MimaBuild.scala                                          | 2 +-
 project/MimaExcludes.scala                                       | 9 +++++++++
 .../main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala   | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/project/MimaBuild.scala b/project/MimaBuild.scala
index 7444d79eaa9c..f3e10b0eed1e 100644
--- a/project/MimaBuild.scala
+++ b/project/MimaBuild.scala
@@ -86,7 +86,7 @@ object MimaBuild {
 
   def mimaSettings(sparkHome: File, projectRef: ProjectRef): Seq[Setting[_]] = 
{
     val organization = "org.apache.spark"
-    val previousSparkVersion = "4.0.0"
+    val previousSparkVersion = "4.2.0"
     val project = projectRef.project
     val id = "spark-" + project
 
diff --git a/project/MimaExcludes.scala b/project/MimaExcludes.scala
index 46c92fcb133d..92bf780e11d5 100644
--- a/project/MimaExcludes.scala
+++ b/project/MimaExcludes.scala
@@ -71,6 +71,15 @@ object MimaExcludes {
       "org.apache.spark.ml.recommendation.ALS.intermediateStorageLevel"),
     ProblemFilters.exclude[FinalMethodProblem](
       "org.apache.spark.ml.recommendation.ALS.getIntermediateStorageLevel"),
+    // [SPARK-60384] Spark 4.2 artifacts shade Jetty types in these private 
wrapper classes.
+    ProblemFilters.exclude[MissingTypesProblem](
+      "org.apache.spark.ui.ProxyRedirectHandler$MutableFieldsWrapper"),
+    ProblemFilters.exclude[IncompatibleMethTypeProblem](
+      
"org.apache.spark.ui.ProxyRedirectHandler#MutableFieldsWrapper.onAddField"),
+    ProblemFilters.exclude[IncompatibleMethTypeProblem](
+      "org.apache.spark.ui.ProxyRedirectHandler#MutableFieldsWrapper.this"),
+    ProblemFilters.exclude[IncompatibleResultTypeProblem](
+      "org.apache.spark.ui.ProxyRedirectHandler#ResponseWrapper.getHeaders"),
     // [SPARK-57987] Add desc field to the SQL REST API Node case class
     
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.status.api.v1.sql.Node.apply"),
     
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.status.api.v1.sql.Node.copy"),
diff --git 
a/tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala 
b/tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala
index bd94ffa8ee8a..32ad2f8974c4 100644
--- a/tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala
+++ b/tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala
@@ -157,7 +157,7 @@ object GenerateMIMAIgnore {
    * and subpackages both from directories and jars present on the classpath.
    */
   private def getClasses(packageName: String): Set[String] = {
-    val finder = ClassFinder(maybeOverrideAsmVersion = Some(Opcodes.ASM8))
+    val finder = ClassFinder(maybeOverrideAsmVersion = Some(Opcodes.ASM9))
     finder
       .getClasses()
       .map(_.name)


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

Reply via email to