jvstein opened a new issue #8792:
URL: https://github.com/apache/airflow/issues/8792


   **Apache Airflow version**: 1.10.9
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl 
version`): 1.14.9
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: AWS EKS
   - **OS** (e.g. from /etc/os-release): Linux (debian 9.12 inside docker image)
   - **Kernel** (e.g. `uname -a`): 5.4.0 (on my host)
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   
   I ran a new task using the `KubernetesPodOperator` on our k8s cluster. This 
pod is designed to write to the `/airflow/xcom/return.json` even in case of 
failures so we can send a user-friendly error message in a following task. The 
pod exits with a non-zero exit code, so Airflow appropriately updates the task 
as failed, but the XCOM values are not available.
   
   **What you expected to happen**:
   
   I expected XCOM variables to be available even on pod failure. We use this 
capability in other operators to signal error conditions and messages.
   
   **How to reproduce it**:
   
   Run a KubernetesPodOperator with a command like this in an alpine image.
   
   ```
   /bin/bash -c 'echo "{'success': False}" > /airflow/xcom/return.json; echo 1'
   ```
   
   Check the XCOM results, which should include the JSON dictionary.
   
   
   **Anything else we need to know**:


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