m1racoli opened a new pull request, #56976: URL: https://github.com/apache/airflow/pull/56976
While `KubernetesPodTrigger` is polling the KPO pod, in case of large values for `poll_interval` (i.e 900 seconds) it can happen that the completed pod is being deleted in-between polls. This causes the following chain of events: 1. 404 pod not found error inside `KubernetesPodTrigger` 2. `KubernetesPodOperator.trigger_reentry` ending up in another 404 pod not found in `self.hook.get_pod` 3. `KubernetesPodOperator._clean` being called as part of the `finally` block 4. `KubernetesPodOperator.pod_manager.await_pod_completion` failing to handle `self.pod == None` ending up in `AttributeError: 'NoneType' object has no attribute 'metadata'` We improve this situation with the following adjustments: * log the original exception with stack trace in the trigger for better visibility of the original error * log the actual poll interval being used when starting the trigger * return from `KubernetesPodOperator._call` early if `self.pod` is `None` -- 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]
