johnhoran commented on code in PR #61778:
URL: https://github.com/apache/airflow/pull/61778#discussion_r2803838184
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -946,6 +946,7 @@ def trigger_reentry(self, context: Context, event:
dict[str, Any]) -> Any:
"""
self.pod = None
xcom_sidecar_output = None
+ skip_cleanup = False
Review Comment:
I think it would complicate the code. Right now the timeout code will check
to see if the pod is running, but also if its running and then terminated. In
the terminated case it will call the `invoke_defer_method`, which will skip
calling the defer code, and just call `trigger_reentry` again with a completed
status. So the pod will get cleaned up etc. Then we hand back to the initial
call, and I guess I'd need to make a k8s API call to check the status again in
order to avoid killing the pod if it has already been killed.
--
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]