You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/05/12 17:25:46 UTC
[GitHub] [airflow] uranusjr commented on a diff in pull request #23160: Always -f when removing container after DockerOperator execution
uranusjr commented on code in PR #23160:
URL: https://github.com/apache/airflow/pull/23160#discussion_r871639968
##########
airflow/providers/docker/operators/docker.py:
##########
@@ -187,7 +187,14 @@ def __init__(
) -> None:
super().__init__(**kwargs)
self.api_version = api_version
- self.auto_remove = auto_remove
+ if str(auto_remove) == "False":
+ self.auto_remove = "never"
+ elif str(auto_remove) == "True":
+ self.auto_remove = "success"
+ elif str(auto_remove) in ("never", "success", "force"):
+ self.auto_remove = str(auto_remove)
Review Comment:
```suggestion
self.auto_remove = auto_remove
```
Doesn’t seem to be needed?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org