iamvvekverma opened a new pull request, #59948:
URL: https://github.com/apache/airflow/pull/59948

   ### What does this PR do?
   
   This PR improves error handling in `PodManager.read_pod` by explicitly 
detecting
   HTTP 404 responses when reading a Kubernetes pod and raising a clearer, more
   actionable exception.
   
   ### Why is this needed?
   
   In Kubernetes-based Airflow deployments, pods can be transiently deleted or
   preempted (for example, during node autoscaling or daemonset scheduling). 
When
   this occurs, the Kubernetes API returns a 404 error. Currently, this 
condition
   is caught generically and causes immediate task failure without preserving 
the
   semantic meaning of the error.
   
   Explicitly handling the 404 case makes this failure mode clearer and lays
   groundwork for future improvements such as internal retries for transient pod
   preemption scenarios.
   
   ### How was this tested?
   
   Manually verified code path and exception handling logic.
   No behavior change is introduced for non-404 API errors.
   
   ### Related issue
   
   Closes #59626
   


-- 
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]

Reply via email to