ashb commented on a change in pull request #4345: [AIRFLOW-3249] unify (and 
fix) pushing result to xcom
URL: https://github.com/apache/airflow/pull/4345#discussion_r254620130
 
 

 ##########
 File path: airflow/operators/docker_operator.py
 ##########
 @@ -238,9 +235,8 @@ def execute(self, context):
             if result['StatusCode'] != 0:
                 raise AirflowException('docker container failed: ' + 
repr(result))
 
-            if self.xcom_push_flag:
-                return self.cli.logs(container=self.container['Id']) \
-                    if self.xcom_all else str(line)
+            return self.cli.logs(container=self.container['Id']) \
+                if self.xcom_all else line.encode('utf-8')
 
 Review comment:
   Hmmm. This is a somewhat expensive operation if the result is going to be 
thrown away at the next stage...

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to