Shivarp1 commented on issue #8792:
URL: https://github.com/apache/airflow/issues/8792#issuecomment-696863575


   @jvstein Have you tried it in Airflow 1.10.12 version?   ( k8s server 
version v1.17.4;  k8s client version v1.15.3)
   I am passing to KubernetesPodOperator
     _cmds=["/bin/bash", "-cx"],
     arguments=['echo \'{"success": True}\'  > /airflow/xcom/return.json; echo 
0'],_
   
   the task returns success..and starts the dependent followup task however it 
still gets no value from /airflow/xcom/return.json
   ----- bash task log from the spawned k8spod
   {{pod_launcher.py:173}} INFO - Event: 
secondary-bash-62564f5389134383924eae918edb8ef6 had an event of type Succeeded
   {{pod_launcher.py:287}} INFO - Event with job id 
secondary-bash-62564f5389134383924eae918edb8ef6 Succeeded
   {{pod_launcher.py:156}} INFO - b'+ echo \'{"success": True}\'\n'
   {{pod_launcher.py:156}} INFO - b'/bin/bash: /airflow/xcom/return.json: No 
such file or directory\n'
   {{pod_launcher.py:156}} INFO - b'+ echo 0\n'
   {{pod_launcher.py:156}} INFO - b'0\n'
   -- followup task code..
   _retVal = task_instance.xcom_pull(task_ids='Secondary-bash-task')
   print("Printing Secondary Task Return value. ")
   print(retVal)_
   --- followup task log..
   {{logging_mixin.py:112}} INFO - Printing Secondary Task Return value.
   {{logging_mixin.py:112}} INFO - None
   {{python_operator.py:114}} INFO - Done. Returned value was: True
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to