potiuk commented on a change in pull request #21429:
URL: https://github.com/apache/airflow/pull/21429#discussion_r801900407
##########
File path: airflow/providers/docker/operators/docker.py
##########
@@ -302,12 +310,12 @@ def _run_image_with_mounts(self, target_mounts,
add_tmp_variable: bool) -> Optio
'stderr': True,
'stream': True,
}
-
- return (
- self.cli.logs(**log_parameters)
- if self.xcom_all
- else self.cli.logs(**log_parameters, tail=1)
- )
+ if self.xcom_all:
+ return [stringify(line).strip() for line in
self.cli.logs(**log_parameters)]
+ else:
+ lines = [stringify(line).strip() for line in
self.cli.logs(**log_parameters, tail=1)]
Review comment:
I actually changed a bit - because I realized we had no case for "no
lines returned" and well - obviouly - it failed so I had to fix it and reworked
that one a bit.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]