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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to