You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/17 14:08:54 UTC

[GitHub] [airflow] uranusjr commented on pull request #17654: Only call `task_runner.return_code` from `LocalTaskJob._execute`

uranusjr commented on pull request #17654:
URL: https://github.com/apache/airflow/pull/17654#issuecomment-900331190


   I can’t say I understand the full rationale of the original implementation, but one reason `return_code` should be called here is to ensure it’s called at least once during the task runner’s lifetime. Otherwise, if we terminate a runner without it ever heartbeating, we would incorrectly set `self._rc = -9` even if the underlying process ended cleanly.
   
   Maybe the correct approach to test this is to say `StandardTaskRunner.return_code()` is guaranteed to be called one additional time when it terminates. Otherwise, we’d want to do some refactoring to ensure we have the underlying’s return code without calling `return_code()`.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org