Lee-W commented on code in PR #34199:
URL: https://github.com/apache/airflow/pull/34199#discussion_r1319669252


##########
airflow/providers/common/sql/sensors/sql.py:
##########
@@ -96,19 +96,37 @@ def poke(self, context: Any):
         records = hook.get_records(self.sql, self.parameters)
         if not records:
             if self.fail_on_empty:
-                raise AirflowException("No rows returned, raising as per 
fail_on_empty flag")
+                # TODO: remove this if block when min_airflow_version is set 
to higher than 2.7.1
+                message = "No rows returned, raising as per fail_on_empty flag"
+                if self.soft_fail:
+                    raise AirflowSkipException(message)
+                raise AirflowException(message)

Review Comment:
   This is for avoiding breaking changes as suggested in 
https://github.com/apache/airflow/pull/33405#discussion_r1306449016



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