Skip to content

Issue 358 - Support for JDK 17#382

Merged
holdenk merged 10 commits intoholdenk:mainfrom
edmondop:issue-358
Sep 29, 2024
Merged

Issue 358 - Support for JDK 17#382
holdenk merged 10 commits intoholdenk:mainfrom
edmondop:issue-358

Conversation

@edmondop
Copy link
Contributor

@edmondop edmondop commented Apr 25, 2023

Apologies for breaking the build with pull #380. This should work, can you run the workflows before approving?

The fix involved passing a distribution to the setup-java action, see 0c787ce

From the distributions at https://github.com/actions/setup-java#supported-distributions Adopt seem a good one, however the Ubuntu runner uses Temurin from Eclipse: https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md

@holdenk
Copy link
Owner

holdenk commented May 2, 2023

Huzzah added a commit to trigger GHA lets see if it works :)

@edmondop
Copy link
Contributor Author

edmondop commented May 2, 2023

Huzzah added a commit to trigger GHA lets see if it works :)

Thank you. I see it fails, and before fixing I wanted to hear from you. The reason it fails is that the exclusions I added for JDK17 are not for ADOPT but for a different distribution... Do we want to align the distributions with the one used to build Spark on JDK17?

@edmondop
Copy link
Contributor Author

edmondop commented May 2, 2023

I double checked and it is using temurin here https://github.com/apache/spark/blob/master/.github/workflows/build_and_test.yml#L233, so I am aligning the java distros with ebd2232, however it's still fail! But I am sure I had tested it locally, and I just confirmed it

As you see from the following log, on my machine, using Java 17.0.3, the tests pass on commit ebd2232. Is there something special happening in the CI/CD pipeline that I should be aware of @holdenk ?

[info] - approximate time not equal low tolerance
[info] MultipleDataFrameSuites:
23/05/02 16:37:57 WARN SparkContext: Using an existing SparkContext; some configuration may not take effect.
[info] - test nothing
[info] ArtisinalStreamingTest:
[info] - artisinal streaming test
[info] PerfSampleTest:
com.holdenkarau.spark.testing.PerfListener@2dc6592e
[info] - wordcount perf
[info] Run completed in 4 minutes, 47 seconds.
[info] Total number of tests run: 97
[info] Suites: completed 17, aborted 0
[info] Tests: succeeded 97, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[success] Total time: 338 s (05:38), completed May 2, 2023, 4:38:00 PM
sbt:root> console
S[info] Starting scala interpreter...
Welcome to Scala 2.12.15 (OpenJDK 64-Bit Server VM, Java 17.0.3).
Type in expressions for evaluation. Or try :help.

scala> System.getProperty("java.version")
res0: String = 17.0.3

scala> val process = Runtime.getRuntime.exec("git rev-parse --short HEAD")
process: Process = Process[pid=96860, exitValue="not exited"]

scala> process.waitFor
res1: Int = 0

scala> import java.io.BufferedReader;
import java.io.BufferedReader

scala> import java.io.InputStreamReader;
import java.io.InputStreamReader

scala> val reader = new BufferedReader(new InputStreamReader(process.getInputStream))
reader: java.io.BufferedReader = java.io.BufferedReader@70badbbb

scala> reader.readLine()
res2: String = ebd2232

@holdenk holdenk merged commit 010605d into holdenk:main Sep 29, 2024
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.

2 participants