-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-51653][CONNECT][TESTS] Migrate the tests related to RemoteSparkSession
from the connect-client-jvm
module to connect-client-integration-tests
#50463
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
base: master
Are you sure you want to change the base?
Conversation
…starting `SparkConnectServer` when the directory `assembly/target/scala-2.13/jars/` not exist" This reverts commit 38a1958.
This comment was marked as outdated.
This comment was marked as outdated.
.../integration-tests/src/test/scala/org/apache/spark/sql/connect/UDFClassLoadingE2ESuite.scala
Outdated
Show resolved
Hide resolved
cc @HyukjinKwon I'm trying to do this refactoring. Do you have any better suggestions? |
project/SparkBuild.scala
Outdated
ShadeRule.rename("io.netty.**" -> "org.sparkproject.connect.client.io.netty.@1").inAll, | ||
ShadeRule.rename("org.checkerframework.**" -> "org.sparkproject.connect.client.org.checkerframework.@1").inAll, | ||
ShadeRule.rename("javax.annotation.**" -> "org.sparkproject.connect.client.javax.annotation.@1").inAll, | ||
// ShadeRule.rename("javax.annotation.**" -> "org.sparkproject.connect.client.javax.annotation.@1").inAll, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for fix:
[warn] javac exited with exit code 1
[error] (connect-client-integration-tests / Test / compileIncremental) javac returned non-zero exit code
will take another look at it later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems we can only delete this ShadeRule.rename
RemoteSparkSession
from the connect-client-jvm
module to connect-client-integration-tests
@@ -198,7 +198,7 @@ jobs: | |||
if [[ "$INCLUDED_TAGS" != "" ]]; then | |||
./build/mvn $MAVEN_CLI_OPTS -pl "$TEST_MODULES" -Pyarn -Pkubernetes -Pvolcano -Phive -Phive-thriftserver -Phadoop-cloud -Pjvm-profiler -Pspark-ganglia-lgpl -Pkinesis-asl -Djava.version=${JAVA_VERSION/-ea} -Dtest.include.tags="$INCLUDED_TAGS" test -fae | |||
elif [[ "$MODULES_TO_TEST" == "connect" ]]; then | |||
./build/mvn $MAVEN_CLI_OPTS -Dtest.exclude.tags="$EXCLUDED_TAGS" -Djava.version=${JAVA_VERSION/-ea} -pl sql/connect/client/jvm,sql/connect/common,sql/connect/server test -fae | |||
./build/mvn $MAVEN_CLI_OPTS -Dtest.exclude.tags="$EXCLUDED_TAGS" -Djava.version=${JAVA_VERSION/-ea} -pl sql/connect/client/jvm,sql/connect/client/integration-tests,sql/connect/common,sql/connect/server package test -fae |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, it is necessary to use package test
. If only test
is specified, then client-integration-tests
will use the client-jvm
's classes directory instead of a jar file as the build classpath, which will result in a failure of testCompile
.
cc @HyukjinKwon This pr is basically completed, and we can discuss its feasibility. There might still be some duplicate code that can be cleaned up, but I think we can leave that for a follow-up if this plan is feasible. |
What changes were proposed in this pull request?
This pr moves the test cases related to
RemoteSparkSession
from theconnect-client-jvm
module to a new module namedconnect-client-integration-tests
. The new module depends on both theconnect-client-jvm
andassembly
modules, aiming to resolve the circular dependency issue betweenconnect-client-jvm
andassembly
:RemoteSparkSession
in theconnect-client-jvm
module rely on the output from thetarget/scala-2.13/jars
directory of theassembly
module during testing.assembly
module depends on the compilation output of theconnect-client-jvm
module during packaging.The main changes of this pr are as follows:
connect-client-integration-tests
, which depends on both theconnect-client-jvm
andassembly
modules. Move the test cases and related utility code forRemoteSparkSession
from theconnect-client-jvm
module to the new module.assembly
module should already be built whenconnect-client-integration-tests
is being tested.assembly/pom.xml
to executeinstall
anddeploy
to allow theconnect-client-integration-tests
module to depend on theassembly
module.ShadeRule.rename
rule forcom.google.protobuf
inSparkBuild.scala
to align with Maven, ensuring thatUDFClassLoadingE2ESuite
passes tests in both Maven and SBT.ShadeRule.rename
rule forjavax.annotation
to prevent compilation failures.dev/test-jars.txt
,dev/sparktestsupport/modules.py
,dev/lint-scala
, and.github/workflows/maven_test.yml
related to the new module and tests.Why are the changes needed?
Resolve the issue of logical circular dependency between
connect-client-jvm
andassembly
.Does this PR introduce any user-facing change?
No
How was this patch tested?
and
All passed
Was this patch authored or co-authored using generative AI tooling?
No