Skip to content

[LIVY-1072][FOLLOWUP] Fix Scala 2.13 compile error in SparkKubernetesApp - #554

Open
gyogal wants to merge 1 commit into
apache:masterfrom
gyogal:scala213fix
Open

gyogal wants to merge 1 commit into
apache:masterfrom
gyogal:scala213fix

Conversation

@gyogal

@gyogal gyogal commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

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.

How was this patch tested?

mvn install -pl core/scala-2.13,server -am -DskipTests failed with this exact type-mismatch error before the fix and succeeds after it.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Sonnet 5)

`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)
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 53.72%. Comparing base (501e822) to head (5d134a0).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
...ala/org/apache/livy/utils/SparkKubernetesApp.scala 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master     #554       +/-   ##
=============================================
- Coverage     68.68%   53.72%   -14.97%     
+ Complexity     1218      847      -371     
=============================================
  Files           106      106               
  Lines          6815     6870       +55     
  Branches        836      846       +10     
=============================================
- Hits           4681     3691      -990     
- Misses         1666     2738     +1072     
+ Partials        468      441       -27     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gyogal

gyogal commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

@soumyadeeplogin @roczei This is a small follow up fix to LIVY-1072 to make the change compatible with Scala 2.13 (the PR had been merged before the Spark 4 update went in adding Scala 2.13 tests, so the build issue was not discovered).

@roczei

roczei commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@gyogal

I tested it and it resolved the compilation error. Thanks for the fix!

@soumyadeeplogin

Copy link
Copy Markdown
Contributor

LGTM, thanks for catching this @gyogal!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants