-
Notifications
You must be signed in to change notification settings - Fork 28.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-43646][PROTOBUF][BUILD] Split protobuf-assembly
module from protobuf
module
#41466
Conversation
protobuf-assembly
module from protobuf
moduleprotobuf-assembly
module from protobuf
module
Test w/ vanilla jar but deliver assembly jar w/ relocated classes has potential issues, some reflection may work well w/ vanilla classes but not after class relocation. Ideally, we should test the assembly jar if possible, to make sure the artifact that the end user consumes works as expected. But unfortunately, IDEA and Maven have limited support for such cases, not sure about SBT. |
also cc @rangadi Do you have a better solution to this issue? |
I have adopted a different approach to solve the issue: #42236, close this PR first. |
re open |
What changes were proposed in this pull request?
There will be maven test failed of connect server module before this pr:
run
there will be two test failed as follows:
The reason for the test failure is that the Maven test used shaded spark-protobuf jar, and the
Message
typeStorageLevel
used for testing inherited fromcom.google.protobuf.Message
instead oforg.sparkproject.spark_protobuf.protobuf.Message
.GitHub Actions can pass due to sbt test always used non-assembly park-protobuf jar, the
com.google.protobuf.Message
class has not been relocated.So this pr references the patterns of
kafka-0-10/kafka-0-10-assembly
andkinesis-asl/kinesis-asl-assembly
, splittingspark-protobuf
module intospark-protobuf
andspark-protobuf-assembly
, and make connect server module always usespark-protobuf
for testing to maintain the same behavior as sbt testing.With this pr, the above maven test commands will pass.
Why are the changes needed?
Make connect server module can test pass using maven.
Does this PR introduce any user-facing change?
Yes, user needs to use spark-protobuf-assembly jar instead of the previous spark-protobuf jar.
How was this patch tested?
all test passed after this pr.
spark-protobuf-assembly
andspark-protobuf(without this pr)
is the same, andspark-protobuf(with this pr)
is no longer shaded