ashb commented on a change in pull request #4075: [AIRFLOW-502] BashOperator
success/failure conditions not documented
URL: https://github.com/apache/incubator-airflow/pull/4075#discussion_r229991618
##########
File path: airflow/operators/bash_operator.py
##########
@@ -49,6 +49,15 @@ class BashOperator(BaseOperator):
:type env: dict
:param output_encoding: Output encoding of bash command
:type output_encoding: str
+
+ On execution of the operator the task will up for retry when exception is
raised.
+ However if a command exists with non-zero value Airflow will not recognize
+ it as failure unless explicitly specified in the beggining of the script.
Review comment:
```suggestion
it as failure unless the whole shell exits with a failure. The easiest
way of
achieving this is to prefix the command with ``set -e;``
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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