You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2023/04/24 12:02:23 UTC

[GitHub] [spark] LuciferYang opened a new pull request, #40925: [SPARK-43246][BUILD] Ignore `privateClasses` and `privateMembers` from connect mima check as default

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

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on pull request #40925: [SPARK-43246][BUILD] Ignore `privateClasses` and `privateMembers` from connect mima check as default

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #40925:
URL: https://github.com/apache/spark/pull/40925#issuecomment-1578026177

   @hvanhovell 
   
   I think there is a scenario here that we need to clarify:
   
   - Firstly, there may be the following definitions in the sql module
   
   ```scala
   package org.apache.spark.sql
   
   class ClassA {
     def functionA(): DataFrame = ...
   
     private[sql] def functionA(): DataFrame = ...
   }
   
   ```
   
   There are two functions with the same name `functionA` in ClassA and one is defined as `private[sql]`.
   
   
   - Afterwards, we may define the corresponding ClassA in the connect client module as follows:
   
   
   ```scala
   package org.apache.spark.sql
   
   class ClassA {
   
   }
   
   ```
   
   Then, if we run the mima check, the check results will pass even if there is no definition related to `functionA` in ClassA of connect client module, this because `private[sql] def functionA` is in `.generated-mima-member-excludes` as default , and this will be equivalent to we manually adding `ProblemFilters.exclude[Problem]("org.apache.spark.sql.ClassA.functionA")`.
   
   In this scenario, we need to ensure that the function identified as `private[package]` and other functions in same class use different names to avoid above problem.
   
   Do you think this is acceptable? Or should we keep the manual exclude?
   
   
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang closed pull request #40925: [SPARK-43246][BUILD] Ignore `privateClasses` and `privateMembers` from connect mima check as default

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang closed pull request #40925: [SPARK-43246][BUILD] Ignore `privateClasses` and `privateMembers` from connect mima check as default
URL: https://github.com/apache/spark/pull/40925


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] hvanhovell commented on pull request #40925: [SPARK-43246][BUILD] Ignore `privateClasses` and `privateMembers` from connect mima check as default

Posted by "hvanhovell (via GitHub)" <gi...@apache.org>.
hvanhovell commented on PR #40925:
URL: https://github.com/apache/spark/pull/40925#issuecomment-1550283049

   @LuciferYang can you update.
   
   Overall this looks good to me. Can you make sure we don't exclude too many cases?


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on pull request #40925: [SPARK-43246][BUILD] Ignore `privateClasses` and `privateMembers` from connect mima check as default

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #40925:
URL: https://github.com/apache/spark/pull/40925#issuecomment-1554342893

   > Can you make sure we don't exclude too many cases?
   
   Will double check this later


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on pull request #40925: [SPARK-43246][BUILD] Ignore `privateClasses` and `privateMembers` from connect mima check as default

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #40925:
URL: https://github.com/apache/spark/pull/40925#issuecomment-1550820753

   ```
   Error: Exception in thread "main" java.lang.IllegalArgumentException: Unsupported class file major version 61
   	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:195)
   	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:176)
   	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:162)
   	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:283)
   	at org.clapper.classutil.asm.ClassFile$.load(ClassFinderImpl.scala:222)
   	at org.clapper.classutil.ClassFinder.classData(ClassFinder.scala:404)
   	at org.clapper.classutil.ClassFinder.$anonfun$processOpenZip$2(ClassFinder.scala:359)
   	at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
   	at scala.collection.Iterator$$anon$11.nextCur(Iterator.scala:486)
   	at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:492)
   	at scala.collection.Iterator.toStream(Iterator.scala:1417)
   	at scala.collection.Iterator.toStream$(Iterator.scala:1416)
   	at scala.collection.AbstractIterator.toStream(Iterator.scala:1431)
   	at scala.collection.Iterator.$anonfun$toStream$1(Iterator.scala:1417)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   	at scala.collection.immutable.Stream.$anonfun$$plus$plus$1(Stream.scala:372)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   	at scala.collection.immutable.Stream.$anonfun$$plus$plus$1(Stream.scala:372)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   	at scala.collection.immutable.Stream.$anonfun$map$1(Stream.scala:418)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   	at scala.collection.immutable.Stream.filterImpl(Stream.scala:506)
   	at scala.collection.immutable.Stream$.$anonfun$filteredTail$1(Stream.scala:1260)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   	at scala.collection.immutable.Stream$.$anonfun$filteredTail$1(Stream.scala:1260)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   	at scala.collection.generic.Growable.loop$1(Growable.scala:57)
   	at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:61)
   	at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:53)
   	at scala.collection.immutable.Set$SetBuilderImpl.$plus$plus$eq(Set.scala:381)
   	at scala.collection.immutable.Set$SetBuilderImpl.$plus$plus$eq(Set.scala:329)
   	at scala.collection.TraversableLike.to(TraversableLike.scala:786)
   	at scala.collection.TraversableLike.to$(TraversableLike.scala:783)
   	at scala.collection.AbstractTraversable.to(Traversable.scala:108)
   	at scala.collection.TraversableOnce.toSet(TraversableOnce.scala:360)
   	at scala.collection.TraversableOnce.toSet$(TraversableOnce.scala:360)
   	at scala.collection.AbstractTraversable.toSet(Traversable.scala:108)
   	at org.apache.spark.tools.GenerateMIMAIgnore$.getClasses(GenerateMIMAIgnore.scala:[15](https://github.com/LuciferYang/spark/actions/runs/4998621687/jobs/8954833741#step:14:16)6)
   	at org.apache.spark.tools.GenerateMIMAIgnore$.privateWithin(GenerateMIMAIgnore.scala:57)
   	at org.apache.spark.tools.GenerateMIMAIgnore$.main(GenerateMIMAIgnore.scala:1[22](https://github.com/LuciferYang/spark/actions/runs/4998621687/jobs/8954833741#step:14:23))
   	at org.apache.spark.tools.GenerateMIMAIgnore.main(GenerateMIMAIgnore.scala)
   Error: Process completed with exit code 1.
   ```
   
   After rebase the code, the `connect-jvm-client-mima-check` will run failed as above, it seems that master branch has a dependency compiled by Java 17, let me investigate first.
   
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on pull request #40925: [SPARK-43246][BUILD] Ignore `privateClasses` and `privateMembers` from connect mima check as default

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #40925:
URL: https://github.com/apache/spark/pull/40925#issuecomment-1551066383

   > ```
   > Error: Exception in thread "main" java.lang.IllegalArgumentException: Unsupported class file major version 61
   > 	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:195)
   > 	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:176)
   > 	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:162)
   > 	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:283)
   > 	at org.clapper.classutil.asm.ClassFile$.load(ClassFinderImpl.scala:222)
   > 	at org.clapper.classutil.ClassFinder.classData(ClassFinder.scala:404)
   > 	at org.clapper.classutil.ClassFinder.$anonfun$processOpenZip$2(ClassFinder.scala:359)
   > 	at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
   > 	at scala.collection.Iterator$$anon$11.nextCur(Iterator.scala:486)
   > 	at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:492)
   > 	at scala.collection.Iterator.toStream(Iterator.scala:1417)
   > 	at scala.collection.Iterator.toStream$(Iterator.scala:1416)
   > 	at scala.collection.AbstractIterator.toStream(Iterator.scala:1431)
   > 	at scala.collection.Iterator.$anonfun$toStream$1(Iterator.scala:1417)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   > 	at scala.collection.immutable.Stream.$anonfun$$plus$plus$1(Stream.scala:372)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   > 	at scala.collection.immutable.Stream.$anonfun$$plus$plus$1(Stream.scala:372)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   > 	at scala.collection.immutable.Stream.$anonfun$map$1(Stream.scala:418)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   > 	at scala.collection.immutable.Stream.filterImpl(Stream.scala:506)
   > 	at scala.collection.immutable.Stream$.$anonfun$filteredTail$1(Stream.scala:1260)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   > 	at scala.collection.immutable.Stream$.$anonfun$filteredTail$1(Stream.scala:1260)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
   > 	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
   > 	at scala.collection.generic.Growable.loop$1(Growable.scala:57)
   > 	at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:61)
   > 	at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:53)
   > 	at scala.collection.immutable.Set$SetBuilderImpl.$plus$plus$eq(Set.scala:381)
   > 	at scala.collection.immutable.Set$SetBuilderImpl.$plus$plus$eq(Set.scala:329)
   > 	at scala.collection.TraversableLike.to(TraversableLike.scala:786)
   > 	at scala.collection.TraversableLike.to$(TraversableLike.scala:783)
   > 	at scala.collection.AbstractTraversable.to(Traversable.scala:108)
   > 	at scala.collection.TraversableOnce.toSet(TraversableOnce.scala:360)
   > 	at scala.collection.TraversableOnce.toSet$(TraversableOnce.scala:360)
   > 	at scala.collection.AbstractTraversable.toSet(Traversable.scala:108)
   > 	at org.apache.spark.tools.GenerateMIMAIgnore$.getClasses(GenerateMIMAIgnore.scala:[15](https://github.com/LuciferYang/spark/actions/runs/4998621687/jobs/8954833741#step:14:16)6)
   > 	at org.apache.spark.tools.GenerateMIMAIgnore$.privateWithin(GenerateMIMAIgnore.scala:57)
   > 	at org.apache.spark.tools.GenerateMIMAIgnore$.main(GenerateMIMAIgnore.scala:1[22](https://github.com/LuciferYang/spark/actions/runs/4998621687/jobs/8954833741#step:14:23))
   > 	at org.apache.spark.tools.GenerateMIMAIgnore.main(GenerateMIMAIgnore.scala)
   > Error: Process completed with exit code 1.
   > ```
   > 
   > After rebase the code, the `connect-jvm-client-mima-check` will run failed as above, it seems that master branch has a dependency compiled by Java 17, let me investigate first.
   
   change of [9620361](https://github.com/apache/spark/pull/40925/commits/9620361a677013725befabaa262603f7a450ff32) will fix this issue, I will make a separate pr to upgrade the asm version of tools module, submitted just to verify that `connect-jvm-client-mima-check` can execute successfully with this one
   
   
   
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org