j-svensmark opened a new issue, #29002:
URL: https://github.com/apache/airflow/issues/29002

   ### Apache Airflow version
   
   2.5.0
   
   ### What happened
   
   Kubernetes pod operator failed to push xcom value.
   
   After upgrading airflow from 2.2.4 to 2.5.0 (and 
apache-airflow-providers-cncf-kubernetes from 3.0.2 to 5.0.0) pushing of xcom 
values from kubernetes pod operator stopped working.
   
   
   
   ### What you think should happen instead
   
   Example of log before the upgrade
   ```
   [2023-01-17 06:57:54,357] {pod_launcher.py:313} INFO - Running command... 
cat /airflow/xcom/return.json
   
   [2023-01-17 06:57:54,398] {pod_launcher.py:313} INFO - Running command... 
kill -s SIGINT 1
   
   [2023-01-17 06:57:55,012] {pod_launcher.py:186} INFO - ["No non-accuracy 
metrics changed more than 10.0% between 2023-01-15 and 2023-01-16\n"]
   ```
   and after the upgrade
   ```
   [2023-01-18T07:12:32.784+0900] {pod_manager.py:368} INFO - Checking if xcom 
sidecar container is started.
   [2023-01-18T07:12:32.804+0900] {pod_manager.py:372} INFO - The xcom sidecar 
container is started.
   [2023-01-18T07:12:32.845+0900] {pod_manager.py:407} INFO - Running 
command... if [ -s /airflow/xcom/return.json ]; then cat 
/airflow/xcom/return.json; else echo __airflow_xcom_result_empty__; fi
   
   [2023-01-18T07:12:32.895+0900] {pod_manager.py:407} INFO - Running 
command... kill -s SIGINT 1
   
   [2023-01-18T07:12:33.405+0900] {kubernetes_pod.py:431} INFO - Result file is 
empty.
   ```
   
   
   Looking at other timestamps in the log file, it appears that the xcom 
sidecar is run before the pod finishes, instead of waiting until the end.
   
   ### How to reproduce
   
   I used 
`airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator`
 with `get_logs=False`.
   
   ### Operating System
   
   Debian GNU/Linux 11 (bullseye) (based on official airflow image)
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-cncf-kubernetes 3.0.2 and 5.0.0
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   Deployed on GKE using the official helm chart
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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