uranusjr commented on code in PR #75387:
URL: https://github.com/apache/airflow/pull/75387#discussion_r4421628148
##########
task-sdk/src/airflow/sdk/execution_time/supervisor.py:
##########
@@ -2020,10 +2019,12 @@ def _handle_execution_timeout_if_needed(self):
can still run Python signal handlers; one that has not reported a
terminal state within the grace
period is stuck (native code, SIGSEGV) and is sent SIGTERM, then
SIGKILL.
- For a Python task, ``StartExecutionTimeout`` arms the deadline right
before ``execute()``, so bundle
- loading and Dag parsing are not covered; Dag parsing has its own
``dagbag_import_timeout``. For a
- task a language SDK runs, it is armed once the runtime has been sent
``StartupDetails``. Either
- way, the process is sent SIGTERM ``killed_task_cleanup_time`` after
the timeout elapses.
+ For a Python task, ``SetExecutionTimeout`` arms the deadline right
before ``execute()`` with the
+ timeout the task process enforces itself, so both use the same value;
bundle loading and Dag
+ parsing are not covered, as Dag parsing has its own
``dagbag_import_timeout``. For a task a language
+ SDK runs, it is armed with the run context's ``execution_timeout``
once the runtime has been sent
+ ``StartupDetails``. Either way, the process is sent SIGTERM
``killed_task_cleanup_time`` after the
+ timeout elapses.
Review Comment:
Nit: the base class no longer reads the run context. Describe only the
SetExecutionTimeout path here.
--
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]