dstandish commented on code in PR #33718:
URL: https://github.com/apache/airflow/pull/33718#discussion_r1306159238
##########
airflow/sensors/base.py:
##########
@@ -285,6 +286,8 @@ def run_duration() -> float:
def resume_execution(self, next_method: str, next_kwargs: dict[str, Any] |
None, context: Context):
try:
return super().resume_execution(next_method, next_kwargs, context)
+ except TaskDeferralTimeout as e:
+ raise AirflowSensorTimeout(*e.args) from e
Review Comment:
Sorry, with your scenario, can you clarify what will be the difference in
behavior between async and sync?
But aside from this, perhaps it would be helpful to articulate the behavior
we want to design for, and ask the question, does this design enable this
behavior. I am not sure a perfect 1-1 consistency in all parameter
combinations is really necessary; it may not even be practical, or desirable in
some cases. E.g. some paramater combinations may be nonsensical or edge case
manifestations, and it may not be worth the trouble to go out of our way to
reproduce them in the deferrable case.
But so for example with this one:
> The sensor will runs for 1h, timeout, retries after 30m, runs for 1h,
timeout, retries after 30m and timeout after 30m with failed state because the
total time is 3h30.
This seems like a misconfiguration. This behavior seems essentially
equivalent to having no execution_timeout at all.
Concerning what behavior we actually want to design for, the problem as I
understood it is that we want to be able to use `timeout` to signal to a sensor
to fail with no more retries. This does that. What else is missing?
--
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]