Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to Java11 for GHA runner #32138

Merged
merged 2 commits into from
Aug 14, 2024
Merged

Bump to Java11 for GHA runner #32138

merged 2 commits into from
Aug 14, 2024

Conversation

Abacn
Copy link
Contributor

@Abacn Abacn commented Aug 9, 2024

Fix Address #31677 (keep the Issue open for a while to monitor the build status after merge)

Bump default gradle to 8.4 on GHA runner

Remove explicit ref to java8 in GHA; bump default GHA java version to 11

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@github-actions github-actions bot added the build label Aug 9, 2024
@Abacn Abacn force-pushed the bumptojava11 branch 2 times, most recently from 82284e3 to b9c00c2 Compare August 9, 2024 16:27
@Abacn
Copy link
Contributor Author

Abacn commented Aug 9, 2024

Ran a couple of representing tests on this branch all passed: https://github.com/apache/beam/actions?query=branch%3Abumptojava11++

including Flink/Spark runner tests that failing on Java17 (#31762)

@Abacn Abacn marked this pull request as ready for review August 9, 2024 22:18
Copy link
Contributor

github-actions bot commented Aug 9, 2024

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@Abacn
Copy link
Contributor Author

Abacn commented Aug 12, 2024

R: @damccorm

Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@Abacn Abacn marked this pull request as draft August 12, 2024 16:50
@Abacn
Copy link
Contributor Author

Abacn commented Aug 12, 2024

Found that "-Pjava8Home" property was not effective, running more tests

Bump default gradle to 8.4 on GHA runner

Remove explicit ref to java8 in GHA; bump default GHA java version to 11
@Abacn
Copy link
Contributor Author

Abacn commented Aug 12, 2024

SQL PreCommit Java8 (./gradlew :sdks:java:extensions:sql:preCommit -PdisableSpotlessCheck=true -PdisableCheckStyle=true -PtestJavaVersion=8 -PskipCheckerFramework -Pjava8Home=$JAVA8_HOME (gradle java=java11, set java8Home)) passed locally, including JvmVerification on Java8:

"verifyCodeIsCompiledWithJava8 0.017s passed "

@Abacn Abacn marked this pull request as ready for review August 12, 2024 19:36
@lostluck lostluck added this to the 2.59.0 Release milestone Aug 13, 2024
Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, just had one question.

When we're ready to merge, we should monitor tests closely to make sure it hasn't broken anything, since its tough to test all the GHA workflows.

@@ -70,6 +70,12 @@ public void verifyTestCodeIsCompiledWithJava21() throws IOException {
}

// jvm
@Test
public void verifyRunningJVMVersionIs8() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this one?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And should it replace the Is11 check?

Copy link
Contributor Author

@Abacn Abacn Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this one?

It is needed by the :sdks:java:testing:test-utils:verifyJavaVersion$testVer target. When gradle command has testJavaVersion property, this is added as a dependency in a few tests here:

if (project.hasProperty("testJavaVersion")) {

in order to verify the test indeed running on Java runtime of the version assigned by -PtestJavaVersion=testVer. Previously GHA test suites only has 11,17,21. Now this PR added a few Java8 tests with -PtestJavaVersion=8 so new test is exercised.

And should it replace the Is11 check?

I'm trying to generalize the buildSrc such that it does not assume the Java platform. Then one can run a test, saying, with default Java being Java8 or 17 and set -PtestJavaVersion=11. So I added a java8 test entry instead of replace 11 to 8.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks - that makes sense.

@Abacn
Copy link
Contributor Author

Abacn commented Aug 14, 2024

When we're ready to merge, we should monitor tests closely to make sure it hasn't broken anything, since its tough to test all the GHA workflows.

Thanks! for sure

@Abacn Abacn merged commit 3063b55 into master Aug 14, 2024
36 of 38 checks passed
@Abacn Abacn deleted the bumptojava11 branch August 14, 2024 16:53
@Abacn Abacn mentioned this pull request Aug 19, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants