ChickenBenny commented on PR #76103:
URL: https://github.com/apache/airflow/pull/76103#issuecomment-6895462514

   Hi @shivaam, coming back to the 30s wait after the timeout. I think we can 
just drop it, without the coordinator having to pass `killed_task_cleanup_time` 
in.
   
   `SetExecutionTimeout` re-arms the supervisor at the same moment the 
runtime's timer starts, so its SIGTERM lands at exactly timeout + 
`killed_task_cleanup_time`. That's the same point you'd get by reading the 
config. So if `wait()` just waits for the task or `stopWaiting`, without 
`cleanupTimer`, the runtime gets the right window for free and never has to 
know the value. Reporting after SIGTERM still works too, because the supervisor 
keeps handling frames while it escalates to SIGKILL
   
   This would also line up with the other SDKs:
   - Python: the timeout fires inside the task at T, and the runtime adds no 
grace of its own. The task gets until SIGTERM at T + `killed_task_cleanup_time`.
   - Go: I'm planning the same thing for the follow-up to #76359.then wait for 
the task or SIGTERM.
   
   Right now, with the default of 60s, a TS task gets 30s to clea60s, and 
changing the config doesn't move the TS number. Thedocs line "up to 30 seconds" 
would then become "up to `killed_task_cleanup_time`".
   
   The 30s self-exit after a plain SIGTERM (#69079) is a separate thing, so I'd 
leave that as it is.
   
   What do you think?


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