jscheffl commented on code in PR #66596:
URL: https://github.com/apache/airflow/pull/66596#discussion_r3213441940


##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:
##########
@@ -255,7 +255,7 @@ def execute(self, context: Context):
                     f"Kubernetes job '{self.job.metadata.name}' is failed with 
error '{error_message}'"
                 )
             if self.do_xcom_push:
-                return xcom_result
+                return xcom_result[0] if self.unwrap_single and 
len(xcom_result) == 1 else xcom_result

Review Comment:
   Okay, was reading more context of the code above the +/- lines shown in 
Github diff and now realize that the `xcom_result` is initialized as a list so 
then it is safe and consistent to apply.



-- 
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]

Reply via email to