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 2020/04/03 08:53:23 UTC

[GitHub] [beam] mxm commented on a change in pull request #9452: [BEAM-7945] Allow runner to configure semi_persist_dir which is used …

mxm commented on a change in pull request #9452: [BEAM-7945] Allow runner to configure semi_persist_dir which is used …
URL: https://github.com/apache/beam/pull/9452#discussion_r402852054
 
 

 ##########
 File path: runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/environment/DockerEnvironmentFactory.java
 ##########
 @@ -132,20 +133,30 @@ public RemoteEnvironment createEnvironment(Environment environment) throws Excep
             // host networking on Mac)
             .add("--env=DOCKER_MAC_CONTAINER=" + System.getenv("DOCKER_MAC_CONTAINER"));
 
-    List<String> args =
-        ImmutableList.of(
-            String.format("--id=%s", workerId),
-            String.format("--logging_endpoint=%s", loggingEndpoint),
-            String.format("--artifact_endpoint=%s", artifactEndpoint),
-            String.format("--provision_endpoint=%s", provisionEndpoint),
-            String.format("--control_endpoint=%s", controlEndpoint));
+    Boolean retainDockerContainer =
+        pipelineOptions.as(ManualDockerEnvironmentOptions.class).getRetainDockerContainers();
+    if (!retainDockerContainer) {
+      dockerOptsBuilder.add("--rm");
 
 Review comment:
   Indeed looks like a rebasing error. A bit tricky one to get right because we changed the way the container removal worked before the rebasing was done. We were using the `--rm` initially but before the rebase we changed it to remove the container explicitly via `docker remove <container_id>`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services