josh-fell commented on code in PR #30080:
URL: https://github.com/apache/airflow/pull/30080#discussion_r1135583110
##########
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:
WDYT about adding some logging here? It might be nice to let users know that
the retry exit code was returned from the Bash command and the command will be
tried on the next poke interval.
--
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]