uranusjr commented on code in PR #24993:
URL: https://github.com/apache/airflow/pull/24993#discussion_r918789639


##########
airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:
##########
@@ -404,8 +404,12 @@ def await_pod_start(self, pod: k8s.V1Pod):
     def extract_xcom(self, pod: k8s.V1Pod):
         """Retrieves xcom value and kills xcom sidecar container"""
         result = self.pod_manager.extract_xcom(pod)
-        self.log.info("xcom result: \n%s", result)
-        return json.loads(result)
+        if isinstance(result, str) and result.replace('\n', '') == 'False':

Review Comment:
   ```suggestion
           if isinstance(result, str) and result.rstrip() == 'False':
   ```
   
   It may also be worthwile to use a more obscure string (say 
`__airflow_xcom_result_empty__`?) to make the intent easier to identify.



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