GitHub user gffryclrk closed a discussion: Airflow Context in 
KubernetesPodOperator Callback

Hi Airflow Community,

I'm new to the community and I have a question regarding [KubernetesPodOperator 
Callbacks](https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/stable/operators.html#kubernetespodoperator-callbacks):
 is it possible to access the Airflow context from within these callback 
functions? I'd like to access task id, dag id & a few other context variables 
in the callback function but it seems that context [isn't passed as an 
argument](https://github.com/apache/airflow/blob/9fbaca0ab0150d899caea172ea3d1085982edd4f/airflow/providers/cncf/kubernetes/operators/pod.py#L613-L615)
 when the callbacks are called. This seems like a straightforward enough thing 
to add and I'm willing to create a PR but wanted to check and see if I was 
missing something first before doing so. Please let me know!

Thank you,

Geoffrey

GitHub link: https://github.com/apache/airflow/discussions/41202

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to