Skip to content

Commit

Permalink
[Java11 Migration] Migrate Go testing to use Java11 container image f…
Browse files Browse the repository at this point in the history
…or xlang (#32212)
  • Loading branch information
lostluck authored Aug 15, 2024
1 parent 11befd3 commit ced67ec
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,8 @@ class BeamModulePlugin implements Plugin<Project> {
project.apply plugin: "com.dorongold.task-tree"
project.taskTree { noRepeat = true }

project.ext.currentJavaVersion = getSupportedJavaVersion()

project.ext.allFlinkVersions = project.flink_versions.split(',')
project.ext.latestFlinkVersion = project.ext.allFlinkVersions.last()

Expand Down
6 changes: 3 additions & 3 deletions sdks/go/examples/kafka/taxi.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
// Docker Hub.
//
// export DOCKER_ROOT="Your Docker Repository Root"
// ./gradlew :sdks:java:container:java8:docker -Pdocker-repository-root=$DOCKER_ROOT -Pdocker-tag=latest
// docker push $DOCKER_ROOT/beam_java8_sdk:latest
// ./gradlew :sdks:java:container:java11:docker -Pdocker-repository-root=$DOCKER_ROOT -Pdocker-tag=latest
// docker push $DOCKER_ROOT/beam_java11_sdk:latest
//
// For runners in local mode, simply building the container using the default
// values for docker-repository-root and docker-tag will work to have it
Expand All @@ -102,7 +102,7 @@
// pipeline with the --sdk_harness_container_image_override flag for Java, or
// --environment_config flag for Go. For example:
//
// --sdk_harness_container_image_override=".*java.*,${DOCKER_ROOT}/beam_java8_sdk:latest" \
// --sdk_harness_container_image_override=".*java.*,${DOCKER_ROOT}/beam_java11_sdk:latest" \
// --environment_config=${DOCKER_ROOT}/beam_go_sdk:latest
package main

Expand Down
6 changes: 3 additions & 3 deletions sdks/go/examples/xlang/bigquery/wordcount.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
// container repository, such as Docker Hub.
//
// export DOCKER_ROOT="Your Docker Repository Root"
// ./gradlew :sdks:java:container:java8:docker -Pdocker-repository-root=$DOCKER_ROOT -Pdocker-tag=latest
// docker push $DOCKER_ROOT/beam_java8_sdk:latest
// ./gradlew :sdks:java:container:java11:docker -Pdocker-repository-root=$DOCKER_ROOT -Pdocker-tag=latest
// docker push $DOCKER_ROOT/beam_java11_sdk:latest
//
// For runners in local mode, simply building the container using the default values for
// docker-repository-root and docker-tag will work to have it accessible locally.
Expand All @@ -86,7 +86,7 @@
// --sdk_harness_container_image_override flag for Java, or --environment_config flag for Go. For
// example:
//
// --sdk_harness_container_image_override=".*java.*,${DOCKER_ROOT}/beam_java8_sdk:latest" \
// --sdk_harness_container_image_override=".*java.*,${DOCKER_ROOT}/beam_java11_sdk:latest" \
// --environment_config=${DOCKER_ROOT}/beam_go_sdk:latest
package main

Expand Down
10 changes: 5 additions & 5 deletions sdks/go/test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ task flinkValidatesRunner {

dependsOn ":sdks:go:test:goBuild"
dependsOn ":sdks:go:container:docker"
dependsOn ":sdks:java:container:java8:docker"
dependsOn ":sdks:java:container:${project.ext.currentJavaVersion}:docker"
dependsOn ":runners:flink:${project.ext.latestFlinkVersion}:job-server:shadowJar"
dependsOn ":sdks:java:testing:expansion-service:buildTestExpansionServiceJar"
doLast {
Expand All @@ -93,7 +93,7 @@ task flinkValidatesRunner {
task samzaValidatesRunner {
dependsOn ":sdks:go:test:goBuild"
dependsOn ":sdks:go:container:docker"
dependsOn ":sdks:java:container:java8:docker"
dependsOn ":sdks:java:container:${project.ext.currentJavaVersion}:docker"
dependsOn ":runners:samza:job-server:shadowJar"
dependsOn ":sdks:java:testing:expansion-service:buildTestExpansionServiceJar"
doLast {
Expand All @@ -118,7 +118,7 @@ task sparkValidatesRunner {
group = "Verification"

dependsOn ":sdks:go:test:goBuild"
dependsOn ":sdks:java:container:java8:docker"
dependsOn ":sdks:java:container:${project.ext.currentJavaVersion}:docker"
dependsOn ":runners:spark:3:job-server:shadowJar"
dependsOn ":sdks:java:testing:expansion-service:buildTestExpansionServiceJar"
doLast {
Expand Down Expand Up @@ -149,7 +149,7 @@ tasks.register("ulrValidatesRunner") {

dependsOn ":sdks:go:test:goBuild"
dependsOn ":sdks:go:container:docker"
dependsOn ":sdks:java:container:java8:docker"
dependsOn ":sdks:java:container:${project.ext.currentJavaVersion}:docker"
dependsOn "setupVirtualenv"
dependsOn ":sdks:python:buildPython"
dependsOn ":sdks:java:testing:expansion-service:buildTestExpansionServiceJar"
Expand Down Expand Up @@ -180,7 +180,7 @@ task prismValidatesRunner {

dependsOn ":sdks:go:test:goBuild"
dependsOn ":sdks:go:container:docker"
dependsOn ":sdks:java:container:java8:docker"
dependsOn ":sdks:java:container:${project.ext.currentJavaVersion}:docker"
dependsOn ":sdks:java:testing:expansion-service:buildTestExpansionServiceJar"
doLast {
def pipelineOptions = [ // Pipeline options piped directly to Go SDK flags.
Expand Down

0 comments on commit ced67ec

Please sign in to comment.