lucafuji edited a comment on issue #6870: [AIRFLOW-0578] Check return code URL: https://github.com/apache/airflow/pull/6870#issuecomment-575732495 > Im not sure your test as it stands covers the new code - the BashOperator handles return code for that command already. > > I think what you need to test is a Python operator that calls `os._exit(1)` - but the real way of testing would be to run the test without calling your new on_failure, see it fail, then run it again with it enabled On https://github.com/apache/airflow/blob/master/airflow/operators/bash_operator.py#L137, bash operator will throw an exception if the return code is non zero. However, on https://github.com/apache/airflow/blob/master/airflow/task/task_runner/standard_task_runner.py#L85, it will catch this exception and return a return code of 1. This is what this PR trying to solve. This return code is not handled properly by local_task_job. And my test case did cover this.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
