kaxil commented on code in PR #56202:
URL: https://github.com/apache/airflow/pull/56202#discussion_r2388082086
##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -945,9 +945,12 @@ def next_retry_datetime(self):
For exponential backoff, retry_delay is used as base and will be
converted to seconds.
"""
- from airflow.sdk.definitions._internal.abstractoperator import
MAX_RETRY_DELAY
+ from airflow.sdk.definitions._internal.abstractoperator import
DEFAULT_RETRY_DELAY, MAX_RETRY_DELAY
delay = self.task.retry_delay
+ if delay is None:
+ # If retry_delay is None, use the default delay
+ delay = DEFAULT_RETRY_DELAY
Review Comment:
A better solution would be to add a default to `retry_delay` at the
following place
https://github.com/apache/airflow/blob/33e1d28a2344ae01ed0896f6718a1e5b9797605f/airflow-core/src/airflow/serialization/serialized_objects.py#L1294
and in the schema:
https://github.com/apache/airflow/blob/33e1d28a2344ae01ed0896f6718a1e5b9797605f/airflow-core/src/airflow/serialization/schema.json#L286C10-L286C19
---
But it would be good to understand when this happen for me. Do you
explicitly pass `retry_delay` as None?
**I think I know why!** -- but yeah let's fix it as above
--
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]