argibbs commented on code in PR #30080:
URL: https://github.com/apache/airflow/pull/30080#discussion_r1135779719


##########
airflow/sensors/bash.py:
##########
@@ -83,4 +93,17 @@ def poke(self, context: Context):
                     resp.wait()
                     self.log.info("Command exited with return code %s", 
resp.returncode)
 
-                    return not resp.returncode
+                    # zero code means success, the sensor can go green
+                    if resp.returncode == 0:
+                        return True
+
+                    # we have a retry exit code, sensor retries if return code 
matches, otherwise error
+                    elif self.retry_exit_code is not None:
+                        if resp.returncode == self.retry_exit_code:

Review Comment:
   Ah good point.



-- 
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