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/07/13 01:04:42 UTC

[GitHub] [beam] chamikaramj commented on a diff in pull request #22230: [BEAM-22229] Override external SDK container URLs for Dataflow by default in Java SDK

chamikaramj commented on code in PR #22230:
URL: https://github.com/apache/beam/pull/22230#discussion_r919553792


##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java:
##########
@@ -898,8 +898,19 @@ protected RunnerApi.Pipeline applySdkEnvironmentOverrides(
           throw new RuntimeException("Error parsing environment docker payload.", e);
         }
         String containerImage = dockerPayload.getContainerImage();
+        boolean updated = false;
         for (int i = 0; i < overrides.length; i += 2) {
           containerImage = containerImage.replaceAll(overrides[i], overrides[i + 1]);
+          if (!containerImage.equals(dockerPayload.getContainerImage())) {
+            updated = true;
+          }
+        }
+        if (containerImage.startsWith("apache/beam")

Review Comment:
   This information is maintained in the SDK side so probably we should do the overriding in the SDK side as well: https://github.com/apache/beam/blob/ead9777d3c1e220604fd12643e40a932631ffe99/runners/google-cloud-dataflow-java/build.gradle#L59
   
   For the primary SDK, we already should be doing this during job submission.
   



-- 
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