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/02/05 13:48:54 UTC

[GitHub] [airflow] ashb commented on a change in pull request #13421: BashOperator to raise AirflowSkipException on exit code 255

ashb commented on a change in pull request #13421:
URL: https://github.com/apache/airflow/pull/13421#discussion_r570978881



##########
File path: airflow/operators/bash.py
##########
@@ -51,16 +53,33 @@ class BashOperator(BaseOperator):
     :param output_encoding: Output encoding of bash command
     :type output_encoding: str
 
-    On execution of this operator the task will be up for retry
-    when exception is raised. However, if a sub-command exits with non-zero
-    value Airflow will not recognize 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;``
-    Example:
+    Airflow will evaluate the exit code of the bash command.  In general, a non-zero exit code will result in
+    task failure and zero will result in task success.  Exit code ``255`` will throw an

Review comment:
       ```suggestion
       task failure and zero will result in task success.  Exit code ``127`` will throw an
   ```




----------------------------------------------------------------
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:
users@infra.apache.org