eladkal commented on code in PR #26932:
URL: https://github.com/apache/airflow/pull/26932#discussion_r990100996


##########
airflow/providers/common/sql/operators/sql.py:
##########
@@ -250,7 +250,7 @@ def execute(self, context: Context):
             records = hook.get_first(self.sql)
 
             if not records:
-                raise AirflowException(f"The following query returned zero 
rows: {self.sql}")
+                raise AirflowFailException(f"The following query returned zero 
rows: {self.sql}")

Review Comment:
   I don't think this is right.
   Retry can work for some senarios so we should not block it.
   You can still get the behavior you wish by set retries=0



##########
airflow/providers/common/sql/operators/sql.py:
##########
@@ -250,7 +250,7 @@ def execute(self, context: Context):
             records = hook.get_first(self.sql)
 
             if not records:
-                raise AirflowException(f"The following query returned zero 
rows: {self.sql}")
+                raise AirflowFailException(f"The following query returned zero 
rows: {self.sql}")

Review Comment:
   I don't think this is right.
   Retry can work for some senarios so we should not block it.
   You can still get the behavior you wish by set retries=0
   
   WDYT?



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