AdityaBhattacharya1 commented on code in PR #70092:
URL: https://github.com/apache/airflow/pull/70092#discussion_r3623962398
##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -1268,7 +1268,8 @@ def next_retry_datetime(self):
delay = timedelta(seconds=delay_backoff_in_seconds)
if self.task.max_retry_delay:
delay = min(self.task.max_retry_delay, delay)
- return self.end_date + delay
+ base = self.end_date if self.end_date is not None else
timezone.utcnow()
Review Comment:
> Since is_premature calls next_retry_datetime(), would mutating there mean
a plain read touches the DB?
Yup, looked into `NotInRetryPeriodDep._get_dep_statuses()` as an alternative
as well but even that is similarly reachable so doesn't really make for a
cleaner path. Will go ahead with the aforementioned change 👍🏻
--
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]