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


##########
airflow/sensors/base.py:
##########
@@ -330,6 +330,16 @@ def reschedule(self):
     def get_serialized_fields(cls):
         return super().get_serialized_fields() | {"reschedule"}
 
+    def raise_failed_or_skiping_exception(self, failed_message: str, 
skipping_message: str = "") -> None:
+        """Raise AirflowSkipException if self.soft_fail is set to True. 
Otherwise raise AirflowException."""
+        if self.soft_fail:
+            if skipping_message:
+                message = skipping_message
+            else:
+                message = failed_message
+            raise AirflowSkipException(message)

Review Comment:
   It's not always `{failed_message}{self._skipping_message_postfix}`. e.g., 
https://github.com/apache/airflow/pull/33196/files#diff-257fa1956f6fafd5d9136377b3d84c795882835712892903ff610e37ed688922R289-R293
   
   Even though I think doing it in this function would be ideal, it changes the 
message of existing messages. (I guess this is likely the case for other 
sensors I've not yet started to work on as well)



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