prefect icon indicating copy to clipboard operation
prefect copied to clipboard

Include error from Pod status or events in `KubernetesWorker` events or logs

Open kevingrismore opened this issue 3 months ago • 0 comments

Describe the current behavior

When a Prefect pod fails to start properly in Kubernetes, on the Prefect flow run UI we just see a prefect.kubernetes.pod.failed event followed by a prefect.flow-run.Crashed event, but without any details as to why. However the actual error (in our case a missing prefect binary) is available in the pod details in kubernetes, listed in the pod “status” as well as the kubernetes events for that pod.

Describe the proposed behavior

To avoid users having to dig into k8s to find the error, it would be very helpful if the worker could retrieve the pod status and/or events and send them back to the Prefect UI/logs, perhaps as part of the pod.failed event.

Example Use

No response

Additional context

No response

kevingrismore avatar Oct 28 '24 18:10 kevingrismore