You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/12 10:06:31 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #24993: Fix xcom_sidecar stuck problem

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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org