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 2018/11/14 20:41:59 UTC
[GitHub] XD-DENG commented on a change in pull request #4187: [AIRFLOW-3343]
Update DockerOperator for Docker-py 3.0.0 API changes
XD-DENG commented on a change in pull request #4187: [AIRFLOW-3343] Update DockerOperator for Docker-py 3.0.0 API changes
URL: https://github.com/apache/incubator-airflow/pull/4187#discussion_r233611742
##########
File path: airflow/operators/docker_operator.py
##########
@@ -231,8 +232,8 @@ def execute(self, context):
self.log.info(line)
exit_code = self.cli.wait(self.container['Id'])
- if exit_code != 0:
- raise AirflowException('docker container failed')
+ if exit_code['StatusCode'] != 0:
Review comment:
Thanks @ash! Looks good to me.
A suggestion: given the “self.cli.wait” returns “full” response as a dict now, shall we change the variable name as well? Say from “exit_code” to something like “cli_response” or “cli_result”? Otherwise it may be confusing later.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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