You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/10/21 02:58:52 UTC
[GitHub] [beam] cushon opened a new pull request, #23771: Use --release 8 for builds targeting Java 8
cushon opened a new pull request, #23771:
URL: https://github.com/apache/beam/pull/23771
This ensures cross compilation works correctly when building on JDK 11 and targeting Java 8.
------------------------
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`).
- [ ] 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](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/get-started-contributing/#make-the-reviewers-job-easier).
To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1290835096
Run Java_Spark3_Versions PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1289974396
Run CommunityMetrics PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1291216204
Unfortunately Neo4j has been failing in the post commit since https://ci-beam.apache.org/job/beam_PreCommit_Java_Neo4j_IO_Direct_Cron/510/, @pranavbhandari24 is taking a look into it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1289974735
Run Java_Spark3_Versions PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1289975853
retest this please
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on a diff in pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1002233998
##########
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy:
##########
@@ -913,6 +913,11 @@ class BeamModulePlugin implements Plugin<Project> {
project.tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
+ // Use --release 8 when targeting Java 8 and running on JDK > 8
Review Comment:
```suggestion
// Use --release 8 when targeting Java 8 and running on JDK > 8
//
// Consider migrating compilation and testing to use JDK 9+ and setting '--release=8' as
// the default allowing 'applyJavaNature' to override it for the few modules that need JDK 9+
// artifacts. See https://stackoverflow.com/a/43103038/4368200 for additional details.
```
##########
sdks/java/container/agent/build.gradle:
##########
@@ -59,6 +59,7 @@ if (project.hasProperty('java11Home')) {
project.tasks.each {
it.onlyIf {
project.hasProperty('java11Home') || project.hasProperty('java17Home')
- || JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ || (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) < 0)
Review Comment:
I don't think this change is necessary since we override the compilation of this to use JDK 11 or JDK 17 regardless of what project.javaVersion is set to.
##########
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy:
##########
@@ -913,6 +913,11 @@ class BeamModulePlugin implements Plugin<Project> {
project.tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
+ // Use --release 8 when targeting Java 8 and running on JDK > 8
+ if (JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) == 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0) {
Review Comment:
We would want to set the `--release` flag for `compileTestJava` task as well to ensure artifacts built there don't run into the class / method loading problem as described in https://stackoverflow.com/a/43103038/4368200
##########
sdks/java/testing/jpms-tests/build.gradle:
##########
@@ -134,6 +134,7 @@ plugins.withType(JavaPlugin).configureEach{
project.tasks.each {
it.onlyIf {
project.hasProperty("compileAndRunTestsWithJava17")
- || JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ || (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) < 0)
Review Comment:
I don't think this change is necessary since we override the java compile within BeamModulePlugin.groovy pointing it to JDK 17
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1291216344
Run Python PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik merged pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik merged PR #23771:
URL: https://github.com/apache/beam/pull/23771
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on a diff in pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1003787585
##########
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy:
##########
@@ -913,6 +913,15 @@ class BeamModulePlugin implements Plugin<Project> {
project.tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
+ // Use --release 8 when targeting Java 8 and running on JDK > 8
+ //
+ // Consider migrating compilation and testing to use JDK 9+ and setting '--release=8' as
+ // the default allowing 'applyJavaNature' to override it for the few modules that need JDK 9+
+ // artifacts. See https://stackoverflow.com/a/43103038/4368200 for additional details.
+ if (JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) == 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0) {
+ options.compilerArgs.addAll(['--release', '8'])
Review Comment:
```suggestion
options.compilerArgs += ['--release', '8']
```
##########
sdks/java/container/agent/build.gradle:
##########
@@ -59,6 +59,7 @@ if (project.hasProperty('java11Home')) {
project.tasks.each {
it.onlyIf {
project.hasProperty('java11Home') || project.hasProperty('java17Home')
- || JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ || (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) < 0)
Review Comment:
I think the issue is that `applyJavaNature` is occurring before:
```
if (project.hasProperty('java11Home')) {
javaVersion = "1.11"
def java11Home = project.findProperty('java11Home')
project.tasks.withType(JavaCompile) {
options.fork = true
options.forkOptions.javaHome = java11Home as File
options.compilerArgs += ['-Xlint:-path']
}
} else if (project.hasProperty('java17Home')) {
javaVersion = "1.17"
project.tasks.withType(JavaCompile) {
setJava17Options(options)
checkerFramework {
skipCheckerFramework = true
}
}
}
```
which means that `javaVersion = 8` and hence `--release 8` is being added.
Moving the `if block` to before `applyJavaVersion` would resolve this.
##########
sdks/java/testing/jpms-tests/build.gradle:
##########
@@ -134,6 +134,7 @@ plugins.withType(JavaPlugin).configureEach{
project.tasks.each {
it.onlyIf {
project.hasProperty("compileAndRunTestsWithJava17")
- || JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ || (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) < 0)
Review Comment:
This is redundant since `javaVersion` is specified as `1.11` before `applyJavaNature`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1294261949
Thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] cushon commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
cushon commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1286395618
R: @lukecwik
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1289989614
Still getting failures about using release version 8 when not being supported:
https://ci-beam.apache.org/job/beam_PreCommit_Java_Amazon-Web-Services_IO_Direct_Commit/307/console
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] cushon commented on a diff in pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
cushon commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1004605465
##########
sdks/java/container/agent/build.gradle:
##########
@@ -55,6 +39,22 @@ if (project.hasProperty('java11Home')) {
}
}
Review Comment:
I'm seeing CI failures for Java 17, e.g.
```
21:52:00 A problem occurred evaluating project ':sdks:java:container:agent'.
21:52:00 > Failed to apply plugin 'org.gradle.java'.
21:52:00 > Could not create task ':sdks:java:container:agent:compileJava'.
21:52:00 > Could not get unknown property 'errorprone' for task ':sdks:java:container:agent:compileJava' property 'options' of type org.gradle.api.tasks.compile.CompileOptions.
```
https://ci-beam.apache.org/job/beam_PreCommit_Java_Examples_Dataflow_Java17_Commit/4060/console
I think we need to _just_ set `javaVersion` before `applyJavaNature`, and continue to do the rest of the configuration after.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1291130651
Run Java_Neo4j_IO_Direct PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] cushon commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
cushon commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1290708322
> Still getting failures about using release version 8 when not being supported: https://ci-beam.apache.org/job/beam_PreCommit_Java_Amazon-Web-Services_IO_Direct_Commit/307/console
>
> Are we running into [google/error-prone#1237](https://github.com/google/error-prone/issues/1237) or something else?
>
> Note that https://ci-beam.apache.org/job/beam_PreCommit_Java_Amazon-Web-Services_IO_Direct_Commit/ is configured to use JDK 8 so I would not have expected the `--release 8` flag from applying at all.
I'm having trouble reproducing that failure, if I build locally using the same command line and JDK 8 it passes. Do you know if there's anything additional configuration for that job I would need to reproduce?
```
JAVA_HOME=${JAVA8_HOME?} gradlew -PdisableSpotlessCheck=true -PdisableCheckStyle=true --continue --max-workers=8 -Dorg.gradle.jvmargs=-Xms2g -Dorg.gradle.jvmargs=-Xmx6g -Dorg.gradle.vfs.watch=false -Pdocker-pull-licenses :sdks:java:io:amazon-web-services:integrationTest
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1290834934
Run Java_Neo4j_IO_Direct PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on a diff in pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1003786970
##########
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy:
##########
@@ -913,6 +913,11 @@ class BeamModulePlugin implements Plugin<Project> {
project.tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
+ // Use --release 8 when targeting Java 8 and running on JDK > 8
+ if (JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) == 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0) {
Review Comment:
It turns out it does, I misread this and thought it was only applying to the compileJava task.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1289974841
Run Python PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1289974977
Run SQL PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] pranavbhandari24 commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
pranavbhandari24 commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1294255948
Run Java_Neo4j_IO_Direct PreCommi
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] cushon commented on a diff in pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
cushon commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1002256119
##########
sdks/java/container/agent/build.gradle:
##########
@@ -59,6 +59,7 @@ if (project.hasProperty('java11Home')) {
project.tasks.each {
it.onlyIf {
project.hasProperty('java11Home') || project.hasProperty('java17Home')
- || JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ || (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) < 0)
Review Comment:
Without that, we end up trying to compile this with `--release 8` when running on JDK 11, and it fails because it references Java 11-only APIs like `Module`:
```
JAVA_HOME=${JAVA11_HOME?} ./gradlew compileJava
...
> Task :sdks:java:container:agent:compileJava FAILED
/usr/local/google/home/cushon/src/beam/sdks/java/container/agent/src/main/java/org/apache/beam/agent/OpenModuleAgent.java:33: error: cannot find symbol
Set<Module> modulesToOpen = new HashSet<>();
^
symbol: class Module
location: class OpenModuleAgent
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1286412413
# [Codecov](https://codecov.io/gh/apache/beam/pull/23771?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#23771](https://codecov.io/gh/apache/beam/pull/23771?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a2087cf) into [master](https://codecov.io/gh/apache/beam/commit/a138a4f86f6d70dadb9eaefd16ca92d608ba5c5d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a138a4f) will **decrease** coverage by `0.00%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #23771 +/- ##
==========================================
- Coverage 73.17% 73.16% -0.01%
==========================================
Files 720 720
Lines 96044 96053 +9
==========================================
+ Hits 70277 70280 +3
- Misses 24455 24461 +6
Partials 1312 1312
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `82.93% <ø> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/23771?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/python/apache\_beam/internal/gcp/auth.py](https://codecov.io/gh/apache/beam/pull/23771/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW50ZXJuYWwvZ2NwL2F1dGgucHk=) | `79.16% <0.00%> (-3.70%)` | :arrow_down: |
| [sdks/python/apache\_beam/runners/direct/executor.py](https://codecov.io/gh/apache/beam/pull/23771/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9kaXJlY3QvZXhlY3V0b3IucHk=) | `96.46% <0.00%> (-0.55%)` | :arrow_down: |
| [sdks/python/apache\_beam/io/gcp/gcsio.py](https://codecov.io/gh/apache/beam/pull/23771/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vZ2NwL2djc2lvLnB5) | `92.12% <0.00%> (-0.14%)` | :arrow_down: |
| [...hon/apache\_beam/runners/worker/bundle\_processor.py](https://codecov.io/gh/apache/beam/pull/23771/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy93b3JrZXIvYnVuZGxlX3Byb2Nlc3Nvci5weQ==) | `93.54% <0.00%> (-0.13%)` | :arrow_down: |
| [sdks/python/apache\_beam/runners/common.py](https://codecov.io/gh/apache/beam/pull/23771/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9jb21tb24ucHk=) | `88.59% <0.00%> (-0.13%)` | :arrow_down: |
| [...on/apache\_beam/runners/dataflow/dataflow\_runner.py](https://codecov.io/gh/apache/beam/pull/23771/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9kYXRhZmxvdy9kYXRhZmxvd19ydW5uZXIucHk=) | `80.80% <0.00%> (+0.13%)` | :arrow_up: |
| [sdks/python/apache\_beam/transforms/util.py](https://codecov.io/gh/apache/beam/pull/23771/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy91dGlsLnB5) | `96.22% <0.00%> (+0.15%)` | :arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] github-actions[bot] commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1286419623
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] cushon commented on a diff in pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
cushon commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1002248626
##########
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy:
##########
@@ -913,6 +913,11 @@ class BeamModulePlugin implements Plugin<Project> {
project.tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
+ // Use --release 8 when targeting Java 8 and running on JDK > 8
+ if (JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) == 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0) {
Review Comment:
I do not have a lot of gradle experience, sorry for the naive question: how do I do that? I thought that `JavaCompile ` covered both `compileJava` and `compileTestJava` tasks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] cushon commented on a diff in pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
cushon commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1003809435
##########
sdks/java/container/agent/build.gradle:
##########
@@ -59,6 +59,7 @@ if (project.hasProperty('java11Home')) {
project.tasks.each {
it.onlyIf {
project.hasProperty('java11Home') || project.hasProperty('java17Home')
- || JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ || (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) < 0)
Review Comment:
Done, thanks.
When I was testing earlier I hadn't been setting `-Pjava11Home=`, I was just setting `JAVA_HOME` to JDK 11. Is that not a supported configuration? I wasn't sure why it was relying on that vs. checking `JavaVersion.current()`.
##########
sdks/java/testing/jpms-tests/build.gradle:
##########
@@ -134,6 +134,7 @@ plugins.withType(JavaPlugin).configureEach{
project.tasks.each {
it.onlyIf {
project.hasProperty("compileAndRunTestsWithJava17")
- || JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ || (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) < 0)
Review Comment:
Reverted, thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on a diff in pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1004707609
##########
sdks/java/container/agent/build.gradle:
##########
@@ -55,6 +39,22 @@ if (project.hasProperty('java11Home')) {
}
}
Review Comment:
Your right, its as if `javaVersion` should be a parameter to `applyJavaNature`, ;-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1289974501
Run Java PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1291130579
Run Python PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1289974619
Run Java_Neo4j_IO_Direct PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on a diff in pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1004002090
##########
sdks/java/container/agent/build.gradle:
##########
@@ -59,6 +59,7 @@ if (project.hasProperty('java11Home')) {
project.tasks.each {
it.onlyIf {
project.hasProperty('java11Home') || project.hasProperty('java17Home')
- || JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ || (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) < 0)
Review Comment:
Lack of familiarity with gradle led to solutions that worked but weren't great.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1294253271
@pranavbhandari24 Any updates on the Neo4j precommit failure?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] pranavbhandari24 commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
pranavbhandari24 commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1294256692
Run Java_Neo4j_IO_Direct PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] pranavbhandari24 commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
pranavbhandari24 commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1294261507
I fixed it in https://github.com/apache/beam/pull/23862
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on a diff in pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1004707609
##########
sdks/java/container/agent/build.gradle:
##########
@@ -55,6 +39,22 @@ if (project.hasProperty('java11Home')) {
}
}
Review Comment:
Your right, its as if `javaVersion` should be a parameter to `applyJavaNature`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23771: Use --release 8 for builds targeting Java 8
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23771:
URL: https://github.com/apache/beam/pull/23771#issuecomment-1290835225
Run Python PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org