Skip to content

Conversation

@LuciferYang
Copy link
Contributor

@LuciferYang LuciferYang commented Aug 31, 2023

What changes were proposed in this pull request?

This reverts commit df63adf.

Why are the changes needed?

As reported by @MaxGekk , the solution for #42236 is not perfect, and it breaks the usability of importing Spark as a Maven project into idea. On the other hand, if mvn clean test is executed, test failures will also occur like

[ERROR] [Error] /tmp/spark-3.5.0/connector/connect/server/target/generated-test-sources/protobuf/java/org/apache/spark/sql/protobuf/protos/TestProto.java:9:46:  error: package org.sparkproject.spark_protobuf.protobuf does not exist

Therefore, this pr will revert the change of SPARK-43646, and from_protobuf messageClassName and from_protobuf messageClassName options in PlanGenerationTestSuite will be ignored in a follow-up.

At present, it is difficult to make the maven testing of the spark-protobuf function in the connect module as good as possible.

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

…ark-proto` uber jar to test the `connect` module"

This reverts commit df63adf.
@LuciferYang
Copy link
Contributor Author

cc @MaxGekk Could you help take a look at this? This is a clean revert.

@LuciferYang
Copy link
Contributor Author

Thanks @MaxGekk

LuciferYang added a commit that referenced this pull request Aug 31, 2023
…ark-proto` uber jar to test the `connect` module"

### What changes were proposed in this pull request?
This reverts commit df63adf.

### Why are the changes needed?
As [reported](#42236 (comment)) by MaxGekk , the solution for #42236 is not perfect, and it breaks the usability of importing Spark as a Maven project into idea. On the other hand, if `mvn clean test` is executed, test failures will also occur like
```
[ERROR] [Error] /tmp/spark-3.5.0/connector/connect/server/target/generated-test-sources/protobuf/java/org/apache/spark/sql/protobuf/protos/TestProto.java:9:46:  error: package org.sparkproject.spark_protobuf.protobuf does not exist
```
Therefore, this pr will revert the change of SPARK-43646, and `from_protobuf messageClassName` and `from_protobuf messageClassName options` in `PlanGenerationTestSuite` will be ignored in a follow-up.

At present, it is difficult to make the maven testing of the `spark-protobuf` function in the `connect` module as good as possible.

### 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 #42746 from LuciferYang/Revert-SPARK-43646.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: yangjie01 <[email protected]>
(cherry picked from commit 723a0aa)
Signed-off-by: yangjie01 <[email protected]>
@LuciferYang
Copy link
Contributor Author

Merged into master and branch-3.5

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 <[email protected]>
Signed-off-by: yangjie01 <[email protected]>
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 <[email protected]>
Signed-off-by: yangjie01 <[email protected]>
(cherry picked from commit 10f3190)
Signed-off-by: yangjie01 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants