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/04/06 00:30:38 UTC

[GitHub] [beam] robertwb commented on a diff in pull request #17249: [BEAM-14232] Only resolve artifacts in expanded environments for Java External Transform

robertwb commented on code in PR #17249:
URL: https://github.com/apache/beam/pull/17249#discussion_r843366367


##########
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/External.java:
##########
@@ -263,9 +268,11 @@ public OutputT expand(InputT input) {
       return toOutputCollection(outputMapBuilder.build());
     }
 
-    private RunnerApi.Components resolveArtifacts(RunnerApi.Components components) {
-      if (components.getEnvironmentsMap().values().stream()
-          .allMatch(env -> env.getDependenciesCount() == 0)) {
+    private RunnerApi.Components resolveArtifacts(
+        RunnerApi.Components components, Set<String> originalEnvIds) {

Review Comment:
   It would be a cleaner API to pass the set of environments that should be expanded than pass in the set that should not be. (Even better might be to simply take a Map<string, Environment> rather than the whole surrounding Components object.)



##########
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/External.java:
##########
@@ -71,6 +72,7 @@
 @Experimental(Kind.PORTABILITY)
 @SuppressWarnings({
   "rawtypes", // TODO(https://issues.apache.org/jira/browse/BEAM-10556)
+  "keyfor",

Review Comment:
   Can we scope this more locally?



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