[SPARK-45029][CONNECT][TESTS] Ignore from_protobuf messageClassName/from_protobuf messageClassName options in PlanGenerationTestSuite#42751
Closed
LuciferYang wants to merge 1 commit intoapache:masterfrom
Closed
Conversation
Contributor
Author
rangadi
approved these changes
Aug 31, 2023
rangadi
left a comment
There was a problem hiding this comment.
Thank you @LuciferYang for looking into these very tricky issues (and for explaining in the PRs).
Disabling sounds good to me. Shaded java classes is not used much even in the field because of these complexities.
LuciferYang
added a commit
that referenced
this pull request
Sep 1, 2023
…from_protobuf messageClassName options` in `PlanGenerationTestSuite` ### What changes were proposed in this pull request? This pr aims ignore `from_protobuf messageClassName` and `from_protobuf messageClassName options` in `PlanGenerationTestSuite` and remove the related golden files, after this change `from_protobuf_messageClassName` and `from_protobuf_messageClassName_options` in `ProtoToParsedPlanTestSuite` be ignored too. ### Why are the changes needed? SPARK-43646 | (#42236) makes both Maven and SBT use the shaded `spark-protobuf` module when testing the connect module, this allows `mvn clean install` and `mvn package test` to successfully pass tests. But if `mvn clean test` is executed directly, an error `package org.sparkproject.spark_protobuf.protobuf does not exist` will occur. This is because `mvn clean test` directly uses the classes file of the `spark-protobuf` module for testing, without the 'package', hence it does not `shade` and `relocate` protobuf. On the other hand, the change of SPARK-43646 breaks the usability of importing Spark as a Maven project into IDEA(#42236 (comment)). So #42746 revert the change of [SPARK-43646](https://issues.apache.org/jira/browse/SPARK-43646). It's difficult to find a perfect solution to solve this maven test issues now, as in certain scenarios tests would use the `shaded spark-protobuf jar`, like `mvn package test`, while in some other scenarios it will use the `unshaded classes directory`, such as `mvn clean test`. so this pr ignores the relevant tests first and leaves a TODO(SPARK-45030), to re-enable these tests when we find a better solution. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass Github Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #42751 from LuciferYang/SPARK-45029. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: yangjie01 <yangjie01@baidu.com> (cherry picked from commit 10f3190) Signed-off-by: yangjie01 <yangjie01@baidu.com>
Contributor
Author
|
Merged into master and branch-3.5.Thanks @rangadi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This pr aims ignore
from_protobuf messageClassNameandfrom_protobuf messageClassName optionsinPlanGenerationTestSuiteand remove the related golden files, after this changefrom_protobuf_messageClassNameandfrom_protobuf_messageClassName_optionsinProtoToParsedPlanTestSuitebe ignored too.Why are the changes needed?
SPARK-43646 | (#42236) makes both Maven and SBT use the shaded
spark-protobufmodule when testing the connect module, this allowsmvn clean installandmvn package testto successfully pass tests. But ifmvn clean testis executed directly, an errorpackage org.sparkproject.spark_protobuf.protobuf does not existwill occur. This is becausemvn clean testdirectly uses the classes file of thespark-protobufmodule for testing, without the 'package', hence it does notshadeandrelocateprotobuf.On the other hand, the change of SPARK-43646 breaks the usability of importing Spark as a Maven project into IDEA(#42236 (comment)).
So #42746 revert the change of SPARK-43646.
It's difficult to find a perfect solution to solve this maven test issues now, as in certain scenarios tests would use the
shaded spark-protobuf jar, likemvn package test, while in some other scenarios it will use theunshaded classes directory, such asmvn clean test. so this pr ignores the relevant tests first and leaves a TODO(SPARK-45030), to re-enable these tests when we find a better solution.Does this PR introduce any user-facing change?
No
How was this patch tested?
Pass Github Actions
Was this patch authored or co-authored using generative AI tooling?
No