You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/12/09 14:31:57 UTC

[GitHub] [airflow] yuqian90 commented on pull request #12058: Treat AirflowSensorTimeout as immediate failure without retrying

yuqian90 commented on pull request #12058:
URL: https://github.com/apache/airflow/pull/12058#issuecomment-741809345


   > Good point.
   > 
   > Though that brings up another question: if the task retries, the sensor timeout restarts doesn't it? Is that the behaviour we want for sensors? (Honest q as I can see about 3 ways this might work)
   > 
   > What ever we decided I think we should document clearly how these three parameters interact, please
   
   Hi @ashb , thanks for pointing out that "if the task retries, the sensor timeout restarts". I've now fixed that. It's done by querying the start time of the first `try_number` (instead of querying the current `try_number`). In other words, the starting time only resets after a task is cleared. If it keeps failing and retrying, the starting time is still the starting time of the first try. This is the relevant change: [link to code](https://github.com/apache/airflow/blob/b25c976076e5157731e85cff649c59941ed5051e/airflow/sensors/base.py#L204).
   
   I also added a test for this interaction between `timeout`, `retries` and `reschedule`. And added a section in conepts.rst as an example.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org