tkaymak commented on code in PR #38324:
URL: https://github.com/apache/beam/pull/38324#discussion_r3162565735


##########
runners/spark/job-server/spark_job_server.gradle:
##########
@@ -28,7 +28,10 @@ apply plugin: 'application'
 // we need to set mainClassName before applying shadow plugin
 mainClassName = "org.apache.beam.runners.spark.SparkJobServerDriver"
 
+def parentSparkVersion = project.parent.findProperty('spark_version') ?: ''
+
 applyJavaNature(
+  requireJavaVersion: (parentSparkVersion.startsWith("4") ? 
org.gradle.api.JavaVersion.VERSION_17 : null),

Review Comment:
   Addressed in `41f9df0f`.



##########
runners/spark/spark_runner.gradle:
##########
@@ -21,6 +21,7 @@ import groovy.json.JsonOutput
 apply plugin: 'org.apache.beam.module'
 applyJavaNature(
   enableStrictDependencies: true,
+  requireJavaVersion: (spark_version.startsWith("4") ? 
org.gradle.api.JavaVersion.VERSION_17 : null),

Review Comment:
   Addressed in `41f9df0f`.



##########
runners/spark/spark_runner.gradle:
##########
@@ -35,6 +36,16 @@ applyJavaNature(
 
 description = "Apache Beam :: Runners :: Spark $spark_version"
 
+// Numeric version comparison (lexicographic string compare was fragile — e.g. 
"3.10.0" < "3.5.0").
+def isSparkAtLeast = { String minVersion ->
+  def parts = spark_version.tokenize('.-').findAll { it.isInteger() 
}*.toInteger()
+  def minParts = minVersion.tokenize('.')*.toInteger()

Review Comment:
   Addressed in `41f9df0f`.



-- 
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]

Reply via email to