SparkKubernetesOperator not rendering the templated kuberntes_conn_id after upgrading #42546
Closed
1 of 2 tasks
Labels
area:core
area:providers
kind:bug
This is a clearly a bug
provider:cncf-kubernetes
Kubernetes provider related issues
Apache Airflow version
Other Airflow 2 version (please specify below)
If "Other Airflow 2 version" selected, which one?
2.7
What happened?
I upgraded from airflow version 2.5.3 to 2.7.1 and with that apache-airflow-providers-cncf-kubernetes was also upgraded from 5.2.2 to 7.5.0.
Earlier I was using Kubernetes connection ID like this from Xcoms. I put it in xcoms in the first task where I load all the configs to xcoms
kubernetes_conn_id: "{% raw %}{{ ti.xcom_pull(key ='env_vars', task_ids='fetch_vars')['{% endraw %}{{root_key}}{% raw %}']['kubernetes_conn_id']}}{% endraw %}"
This was working fine, but after upgrading this stopped working and I am getting the following error
The conn_id
{{ ti.xcom_pull(key ='env_variables', task_ids='fetch_env')['cycle_process_client_2332']['kubernetes_conn_id']}}isn't defined
Also in the UI if I check rendered templates tag I can see the conn ID resolved correctly. I am confused, any help is appreciated.
What you think should happen instead?
It should pull the connection ID correctly from the Xcoms.
How to reproduce
Create a dag with and add a task using SparkKubernetesOperator, pass kubernetes_conn_id as a param and assign it Xcom value.
Operating System
linux
Versions of Apache Airflow Providers
apache-airflow-providers-cncf-kubernetes - 7.5
airflow - 2.7
Deployment
Other Docker-based deployment
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: