You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "github-actions[bot] (via GitHub)" <gi...@apache.org> on 2025/08/13 12:34:39 UTC
[PR] [v3-0-test] Handle overflow in TaskInstance `next_retry_datetime` (#48557) [airflow]
github-actions[bot] opened a new pull request, #54460:
URL: https://github.com/apache/airflow/pull/54460
This handles overflow when calculating the next execution time for a task instance by falling back to the configured maximum delay. The solution uses the same strategy that tenacity uses:
https://github.com/jd/tenacity/blob/main/tenacity/wait.py#L167
An alternate solution would be the determine the maximum tries that wouldn't exceed the maximum delay and then not calculate the timeout for values larger than that.
Something like
```
max_delay = self.task.max_retry_delay if self.task.max_retry_delay is not null else MAX_RETRY_DELAY
tries_before_max_delay = math.floor(math.log2(max_delay))
if self.try_number <= tries_before_max_delay:
# existing logic
else:
delay = max_delay
```
(cherry picked from commit 33658f0ff86900a4b679a4506a78cc2c2af226f9)
Co-authored-by: perry2of5 <pe...@yahoo.com>
closes: https://github.com/apache/airflow/issues/47971
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [v3-0-test] Handle overflow in TaskInstance `next_retry_datetime` (#48557) [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil merged PR #54460:
URL: https://github.com/apache/airflow/pull/54460
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org