davidcaron commented on a change in pull request #13793:
URL: https://github.com/apache/airflow/pull/13793#discussion_r570980429
##########
File path: airflow/providers/docker/operators/docker.py
##########
@@ -269,14 +269,17 @@ def _run_image(self) -> Optional[str]:
# duplicated conditional logic because of expensive operation
ret = None
if self.do_xcom_push:
- ret = self.cli.logs(container=self.container['Id']) if
self.xcom_all else line.encode('utf-8')
+ if self.xcom_all:
+ ret = self.cli.logs(container=self.container['Id'])
+ else:
+ ret = self.cli.logs(container=self.container['Id'],
tail=1).strip()
if self.auto_remove:
self.cli.remove_container(self.container['Id'])
return ret
- def execute(self, context) -> Optional[str]:
+ def execute(self, context) -> Optional[bytes]:
Review comment:
Yes, and I think this would make more sense, but again I wanted to avoid
a breaking change...
I would actually be happy with this other PR being merged, as it now
includes the fix in my PR.
----------------------------------------------------------------
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:
[email protected]