You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "damondouglas (via GitHub)" <gi...@apache.org> on 2024/11/20 00:17:15 UTC
[PR] Enable Java SDK Distroless container image variants. [beam]
damondouglas opened a new pull request, #33173:
URL: https://github.com/apache/beam/pull/33173
This PR addresses #32818 adding Java SDK Distroless container image variants. **Future PR will add a GitHub workflows that runs `googleCloudPlatformRunnerV2DistrolessIntegrationTest`**
------------------------
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] 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://github.com/apache/beam/blob/master/CONTRIBUTING.md#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 or the [workflows README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) to see a list of phrases to trigger workflows.
--
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
Re: [PR] Enable Java SDK Distroless container image variants. [beam]
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #33173:
URL: https://github.com/apache/beam/pull/33173#discussion_r1853257481
##########
runners/google-cloud-dataflow-java/build.gradle:
##########
@@ -273,6 +273,87 @@ def createRunnerV2ValidatesRunnerTest = { Map args ->
}
}
+tasks.register('googleCloudPlatformRunnerV2DistrolessIntegrationTest', Test.class) {
Review Comment:
sorry checked that DataflowV2 PostCommit runtime was 4h. 7h was the Dataflow V2 validation test suite, my memory was wrong. still long though. Thanks for the change!
--
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
Re: [PR] Enable Java SDK Distroless container image variants. [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #33173:
URL: https://github.com/apache/beam/pull/33173#issuecomment-2489190398
Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
R: @m-trieu 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).
--
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
Re: [PR] Enable Java SDK Distroless container image variants. [beam]
Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on code in PR #33173:
URL: https://github.com/apache/beam/pull/33173#discussion_r1853195879
##########
runners/google-cloud-dataflow-java/build.gradle:
##########
@@ -273,6 +273,87 @@ def createRunnerV2ValidatesRunnerTest = { Map args ->
}
}
+tasks.register('googleCloudPlatformRunnerV2DistrolessIntegrationTest', Test.class) {
Review Comment:
I changed to use Dataflow Example test suite. Thank you @Abacn :-)
--
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
Re: [PR] Enable Java SDK Distroless container image variants. [beam]
Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on code in PR #33173:
URL: https://github.com/apache/beam/pull/33173#discussion_r1853186457
##########
runners/google-cloud-dataflow-java/build.gradle:
##########
@@ -273,6 +273,87 @@ def createRunnerV2ValidatesRunnerTest = { Map args ->
}
}
+tasks.register('googleCloudPlatformRunnerV2DistrolessIntegrationTest', Test.class) {
+ group = "verification"
+ dependsOn 'buildAndPushDistrolessContainerImage'
+ def javaVer = project.findProperty('testJavaVersion')
+ def repository = "us.gcr.io/apache-beam-testing/${System.getenv('USER')}"
+ def tag = project.findProperty('dockerTag')
+ def imageURL = "${repository}/beam_${javaVer}_sdk_distroless:${tag}"
+ def pipelineOptions = [
+ "--runner=TestDataflowRunner",
+ "--project=${gcpProject}",
+ "--region=${gcpRegion}",
+ "--tempRoot=${dataflowValidatesTempRoot}",
+ "--sdkContainerImage=${imageURL}",
+ "--experiments=use_unified_worker,use_runner_v2",
+ "--firestoreDb=${firestoreDb}",
+ ]
+ systemProperty "beamTestPipelineOptions", JsonOutput.toJson(pipelineOptions)
+
+ include '**/*IT.class'
+ exclude '**/BigQueryIOStorageReadTableRowIT.class'
+ exclude '**/SpannerWriteIT.class'
+ exclude '**/*KmsKeyIT.class'
+ exclude '**/FhirIOReadIT.class'
+ exclude '**/DicomIOReadIT.class'
+ exclude '**/FhirIOWriteIT.class'
+ exclude '**/FhirIOLROIT.class'
+ exclude '**/FhirIOSearchIT.class'
+ exclude '**/FhirIOPatientEverythingIT.class'
+ // failing due to pane index not incrementing after Reshuffle:
+ // https://github.com/apache/beam/issues/28219
+ exclude '**/FileLoadsStreamingIT.class'
+
+ maxParallelForks 4
+ classpath = configurations.googleCloudPlatformIntegrationTest
+ testClassesDirs = files(project(":sdks:java:io:google-cloud-platform").sourceSets.test.output.classesDirs)
+ useJUnit {
+ filter {
+ // Only needs to run on direct runner
+ excludeTestsMatching 'org.apache.beam.sdk.io.gcp.bigtable.BigtableWriteIT.testE2EBigtableWriteWithEmptyMutationFailures'
+ excludeTestsMatching 'org.apache.beam.sdk.io.gcp.bigtable.BigtableWriteIT.testE2EBigtableWriteWithEmptyRowFailures'
+ excludeTestsMatching 'org.apache.beam.sdk.io.gcp.bigtable.BigtableWriteIT.testE2EBigtableWriteWithInvalidTimestampFailures'
+ excludeTestsMatching 'org.apache.beam.sdk.io.gcp.bigtable.BigtableWriteIT.testE2EBigtableWriteWithOversizedQualifierFailures'
+ }
+ }
+}
+
+tasks.register('buildAndPushDistrolessContainerImage', Task.class) {
+ def allowed = ["java17", "java21"]
Review Comment:
@Abacn Yes. Java distroless only contains Java 17 and Java 21: https://github.com/GoogleContainerTools/distroless/tree/main/java#image-contents. If we wanted to support this we would have to build our own Java 8 and Java 11 using bazel to reuse https://github.com/GoogleContainerTools/distroless/blob/main/java/BUILD
--
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
Re: [PR] Enable Java SDK Distroless container image variants. [beam]
Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas merged PR #33173:
URL: https://github.com/apache/beam/pull/33173
--
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
Re: [PR] Enable Java SDK Distroless container image variants. [beam]
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #33173:
URL: https://github.com/apache/beam/pull/33173#discussion_r1852272176
##########
runners/google-cloud-dataflow-java/build.gradle:
##########
@@ -273,6 +273,87 @@ def createRunnerV2ValidatesRunnerTest = { Map args ->
}
}
+tasks.register('googleCloudPlatformRunnerV2DistrolessIntegrationTest', Test.class) {
+ group = "verification"
+ dependsOn 'buildAndPushDistrolessContainerImage'
+ def javaVer = project.findProperty('testJavaVersion')
+ def repository = "us.gcr.io/apache-beam-testing/${System.getenv('USER')}"
+ def tag = project.findProperty('dockerTag')
+ def imageURL = "${repository}/beam_${javaVer}_sdk_distroless:${tag}"
+ def pipelineOptions = [
+ "--runner=TestDataflowRunner",
+ "--project=${gcpProject}",
+ "--region=${gcpRegion}",
+ "--tempRoot=${dataflowValidatesTempRoot}",
+ "--sdkContainerImage=${imageURL}",
+ "--experiments=use_unified_worker,use_runner_v2",
+ "--firestoreDb=${firestoreDb}",
+ ]
+ systemProperty "beamTestPipelineOptions", JsonOutput.toJson(pipelineOptions)
+
+ include '**/*IT.class'
+ exclude '**/BigQueryIOStorageReadTableRowIT.class'
+ exclude '**/SpannerWriteIT.class'
+ exclude '**/*KmsKeyIT.class'
+ exclude '**/FhirIOReadIT.class'
+ exclude '**/DicomIOReadIT.class'
+ exclude '**/FhirIOWriteIT.class'
+ exclude '**/FhirIOLROIT.class'
+ exclude '**/FhirIOSearchIT.class'
+ exclude '**/FhirIOPatientEverythingIT.class'
+ // failing due to pane index not incrementing after Reshuffle:
+ // https://github.com/apache/beam/issues/28219
+ exclude '**/FileLoadsStreamingIT.class'
+
+ maxParallelForks 4
+ classpath = configurations.googleCloudPlatformIntegrationTest
+ testClassesDirs = files(project(":sdks:java:io:google-cloud-platform").sourceSets.test.output.classesDirs)
+ useJUnit {
+ filter {
+ // Only needs to run on direct runner
+ excludeTestsMatching 'org.apache.beam.sdk.io.gcp.bigtable.BigtableWriteIT.testE2EBigtableWriteWithEmptyMutationFailures'
+ excludeTestsMatching 'org.apache.beam.sdk.io.gcp.bigtable.BigtableWriteIT.testE2EBigtableWriteWithEmptyRowFailures'
+ excludeTestsMatching 'org.apache.beam.sdk.io.gcp.bigtable.BigtableWriteIT.testE2EBigtableWriteWithInvalidTimestampFailures'
+ excludeTestsMatching 'org.apache.beam.sdk.io.gcp.bigtable.BigtableWriteIT.testE2EBigtableWriteWithOversizedQualifierFailures'
+ }
+ }
+}
+
+tasks.register('buildAndPushDistrolessContainerImage', Task.class) {
+ def allowed = ["java17", "java21"]
Review Comment:
does this mean java8/11 are excluded from distroless container?
##########
runners/google-cloud-dataflow-java/build.gradle:
##########
@@ -273,6 +273,87 @@ def createRunnerV2ValidatesRunnerTest = { Map args ->
}
}
+tasks.register('googleCloudPlatformRunnerV2DistrolessIntegrationTest', Test.class) {
Review Comment:
DataflowRunnerV2 PostCommit test suite is a very expensive one (7h+ runtime), more expensive if run with multiple Java versions. How about running on Dataflow Example test suite, which was also what ARM tests running on.
ref: https://github.com/apache/beam/blob/master/.github/workflows/beam_PostCommit_Java_Examples_Dataflow_ARM.yml
https://github.com/apache/beam/blob/a06454a22084242b4fe089b570fd090810885885/runners/google-cloud-dataflow-java/arm/build.gradle#L128
--
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