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

Run examples on Java21 #28969

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Run examples on Java21 #28969

merged 1 commit into from
Oct 24, 2023

Conversation

Abacn
Copy link
Contributor

@Abacn Abacn commented Oct 12, 2023

Part of #28967 ; fixes #23695

along with other cleanup on examples and java version handling

  • upgrade gradle 8.3 -> 8.4 which is needed for compiling and run tests with Java21

  • Use temurin 21 base image as its available now

  • Setup a few Java21 postcommits

  • Fix kotlin test

  • Fix javaVersion to be 1.8/11/17/21

Note that Java Dataflow runner v1 pending on internal java21 dev container release so not included in this PR

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.

@@ -77,7 +77,9 @@ jobs:
uses: actions/setup-java@v3.8.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java_version }}
java-version: |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

previous setting was not quite what we want. We want beam (java core, runners) compile with Java8 and test compile and run with Java11/17/21.

Copy link
Contributor Author

@Abacn Abacn Oct 23, 2023

Choose a reason for hiding this comment

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

However, we do want the example jar to be compiled on Java11/17/21, see #28967 as followups

@Abacn Abacn force-pushed the java21tumerin branch 3 times, most recently from 001693c to f67cfa7 Compare October 12, 2023 20:44
@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

Merging #28969 (6580b53) into master (683fbd6) will not change coverage.
Report is 5 commits behind head on master.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #28969   +/-   ##
=======================================
  Coverage   38.37%   38.37%           
=======================================
  Files         686      686           
  Lines      101685   101685           
=======================================
  Hits        39018    39018           
  Misses      61087    61087           
  Partials     1580     1580           
Flag Coverage Δ
python 29.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link
Contributor

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 Abacn changed the title Run examples on Java21 [WIP] Run examples on Java21 Oct 13, 2023
@Abacn Abacn marked this pull request as draft October 13, 2023 14:19
@Abacn Abacn mentioned this pull request Oct 13, 2023
3 tasks
@Abacn Abacn force-pushed the java21tumerin branch 2 times, most recently from 5444d5c to f226b33 Compare October 23, 2023 20:28
* upgrade gradle 8,3 -> 8.4

* Use temurin 21 base image as its available now

* Setup Java21 JPMS postcommits

* Setup Java21 Example PostCommit on DataflowV2

* Fix kotlin test
@Abacn
Copy link
Contributor Author

Abacn commented Oct 23, 2023

Tested by equivalent gradle command

Java Examples

./gradlew :runners:google-cloud-dataflow-java:examplesJavaRunnerV2IntegrationTest -PdisableSpotlessCheck=true -PdisableCheckStyle=true -PskipCheckerFramework -PtestJavaVersion=21 -Pjava21Home=.../.sdkman/candidates/java/21-zulu

jobId: 2023-10-23_13_51_50-1524320457990904336 2023-10-23_13_51_48-3336529009400839971 2023-10-23_13_51_48-540232565689758221 2023-10-23_13_51_48-7689190307853488284 in project apache-beam-testing

all have "userAgent Apache_Beam_SDK_for_Java/2.52.0-SNAPSHOT(JRE_21_environment)" and passed

JPMS

./gradlew :sdks:java:testing:jpms-test:directRunnerIntegrationTest -PskipCheckerFramework -PtestJavaVersion=21 -Pjava21Home=.../.sdkman/candidates/java/21-zulu

@Abacn Abacn changed the title [WIP] Run examples on Java21 Run examples on Java21 Oct 23, 2023
@Abacn Abacn marked this pull request as ready for review October 23, 2023 20:58
@Abacn
Copy link
Contributor Author

Abacn commented Oct 24, 2023

assign set of reviewers

@github-actions
Copy link
Contributor

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @robertwb for label java.
R: @damccorm for label build.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

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.

Thanks - LGTM

@Abacn
Copy link
Contributor Author

Abacn commented Oct 24, 2023

Run Java_PVR_Flink_Batch PreCommit

@Abacn Abacn merged commit bc06581 into apache:master Oct 24, 2023
33 checks passed
@Abacn Abacn deleted the java21tumerin branch October 24, 2023 15:05
@Abacn Abacn mentioned this pull request Oct 24, 2023
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.

[Bug]: Kotlin examples pre-commit test set is empty
2 participants