Andrushika commented on code in PR #73806:
URL: https://github.com/apache/airflow/pull/73806#discussion_r4125606741
##########
task-sdk/src/airflow/sdk/execution_time/supervisor.py:
##########
@@ -291,6 +292,10 @@ def _handle_mask_secret_request(
# like listeners after task is complete.
TASK_OVERTIME_THRESHOLD: float = conf.getfloat("core", "task_success_overtime")
+# How long a task process gets to stop itself (raise AirflowTaskTimeout, run
on_kill, report its state) after
+# execution_timeout elapses before the supervisor sends SIGTERM, and again
before it escalates to SIGKILL.
+EXECUTION_TIMEOUT_GRACE_PERIOD: float = 5.0
Review Comment:
Yeah, that could happen. I am not sure it needs to be configurable for
users, but I would assume yes.
A per-provider grace period would be a new operator-level API, so I would
rather start with a single config.
I found (with some help from my agent) an old option `[core]
killed_task_cleanup_time` (default 60s) that fits: it was the SIGTERM to
SIGKILL cleanup time for a killed task, and nothing has read it in a production
path since #47453 removed the old task runner. I switched the grace period to
it instead of adding a new option.
--
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]