raghavan-arvind commented on code in PR #71256:
URL: https://github.com/apache/airflow/pull/71256#discussion_r3766899139


##########
task-sdk/src/airflow/sdk/bases/sensor.py:
##########
@@ -258,12 +258,16 @@ def resume_execution(self, next_method: str, next_kwargs: 
dict[str, Any] | None,
                 return super().resume_execution(next_method, next_kwargs, 
context)
             except TaskDeferralTimeout as e:
                 raise AirflowSensorTimeout(*e.args) from e
-        except (AirflowException, TaskDeferralError) as e:
+        except (AirflowSensorTimeout, AirflowTaskTimeout, 
AirflowFailException) as e:
             if self.soft_fail:
                 raise AirflowSkipException("Skipping due to soft_fail is set 
to True.") from e
             if self.never_fail:
                 raise AirflowSkipException("Skipping due to never_fail is set 
to True.") from e
             raise
+        except (AirflowException, TaskDeferralError) as e:
+            if self.never_fail:
+                raise AirflowSkipException("Skipping due to never_fail is set 
to True.") from e
+            raise

Review Comment:
   Using logic here for reference:
   
https://github.com/apache/airflow/blob/84d873a36f6089be9fc1358b1a718ebe8fa42331/task-sdk/src/airflow/sdk/bases/sensor.py#L205



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