dimas-b commented on code in PR #4588:
URL: https://github.com/apache/polaris/pull/4588#discussion_r3363441537
##########
plugins/spark/v3.5/integration/build.gradle.kts:
##########
@@ -162,3 +171,69 @@ tasks.named<Test>("intTest").configure {
// For Spark integration tests
addSparkJvmOptions()
}
+
+// Bundle-jar sanity test
+testing {
+ suites {
+ register<JvmTestSuite>("sparkBundleTest") {
+ useJUnitJupiter()
+ dependencies {
+
implementation("org.apache.spark:spark-sql_${scalaVersion}:${spark35Version}") {
+ exclude("org.apache.logging.log4j", "log4j-slf4j2-impl")
+ exclude("org.apache.logging.log4j", "log4j-1.2-api")
+ exclude("org.apache.logging.log4j", "log4j-core")
+ exclude("org.slf4j", "jul-to-slf4j")
+ }
+ implementation(
+
"org.apache.iceberg:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersion}:${icebergVersion}"
+ )
+
implementation(enforcedPlatform("org.scala-lang:scala-library:${scalaLibraryVersion}"))
+
implementation(enforcedPlatform("org.scala-lang:scala-reflect:${scalaLibraryVersion}"))
+ implementation(libs.antlr4.runtime)
+ implementation(libs.javax.servlet.api)
+ runtimeOnly("org.apache.logging.log4j:log4j-core:2.26.0")
+
+ // Bundle jar as a file artifact so the shadow jar is the only source
of
+ // polaris-spark/polaris-core classes
+ runtimeOnly(files(sparkBundleJarTask.flatMap { it.archiveFile }))
Review Comment:
IIRC we have two main modes for using the Polaris Spark plugin: 1) as an
uber jar via the `--jar` Spark shell parameter or 2) as a downloadable artifact
via `--packages`.
I believe @gh-yzou means testing these aspects. I do recall that we had
issues in that area before, so I agree that we ought to test that. I still
believe we can do it without another Docker image :wink:
My memory in this area is faint, but I wonder if the test could start the
Spark Driver the same way as the /bin/spark-sql` shell starts it to have it
validate download and the uber jar loading :thinking: The "driver" program will
be our test code, of course.
We'll have to perform the `publishToMavenLocal` gradle task (already part of
CI, IIRC) before running this test.
WDYT?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]