From 5d134a0a95fc414ae75a2c953e63317ccaf1f536 Mon Sep 17 00:00:00 2001 From: Gyorgy Gal <27883675+gyogal@users.noreply.github.com> Date: Mon, 14 Sep 2026 20:13:45 -0400 Subject: [PATCH] [LIVY-1072][FOLLOWUP] Fix Scala 2.13 compile error in SparkKubernetesApp `KubernetesExtensions.getApplicationReport` failed to compile under Scala 2.13 (the default build): `client.pods...list.getItems.asScala` returns `scala.collection.mutable.Buffer`, but the enclosing `val executors: Seq[Pod]` requires `scala.collection.immutable.Seq` (the 2.13 default for the unqualified `Seq` alias). Scala 2.12 allowed the implicit widening; 2.13 does not. Adds `.toSeq`, matching the same conversion already used a few lines above for the driver-pod lookup. `mvn install -pl core/scala-2.13,server -am -DskipTests` failed with this exact type-mismatch error before the fix and succeeds after it. Generated-by: Claude Code (Sonnet 5) --- .../main/scala/org/apache/livy/utils/SparkKubernetesApp.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/scala/org/apache/livy/utils/SparkKubernetesApp.scala b/server/src/main/scala/org/apache/livy/utils/SparkKubernetesApp.scala index bb8eb291b..fec93ca4e 100644 --- a/server/src/main/scala/org/apache/livy/utils/SparkKubernetesApp.scala +++ b/server/src/main/scala/org/apache/livy/utils/SparkKubernetesApp.scala @@ -742,7 +742,7 @@ private[utils] object KubernetesExtensions { appTagLabel -> app.getApplicationTag, SPARK_ROLE_LABEL -> SPARK_ROLE_EXECUTOR ).asJava) - .list.getItems.asScala + .list.getItems.asScala.toSeq } else { Seq.empty }