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

   Closes #68445 
   
   ### Problem
   When KubernetesPodOperator is configured with init_container_logs=True, the 
task hangs indefinitely if the pod never leaves the Pending phase (e.g. due to 
an invalid node_selector, missing node pool, or resource exhaustion).
   
   With init_container_logs=False, PodLaunchTimeoutException is raised 
correctly after startup_timeout_seconds / schedule_timeout_seconds. With 
init_container_logs=True, the task never times out and the pod is never cleaned 
up.
   
   ### Fix
   await_init_container_start now accepts startup_timeout and schedule_timeout 
parameters and applies the same timeout logic already present in 
await_pod_start:
   
   - It raises PodLaunchTimeoutException if the pod is not scheduled within 
schedule_timeout_seconds
   - It raises PodLaunchTimeoutException if the pod is scheduled but the init 
container hasn't started within startup_timeout_seconds
   
   The default startup_timeout and schedule_timeout is set to 120s and users 
might need to set them to a different value depending on the autoscaler they 
use in their k8s cluster.
   
   Was generative AI tooling used to co-author this PR?
   
   [X] Yes 
   
   Used Claude Sonnet to understand the codebase and assist with implementing 
the changes.
   


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