kaxil commented on code in PR #56202:
URL: https://github.com/apache/airflow/pull/56202#discussion_r2388466953


##########
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:
   Something like:
   
   ```diff
   diff --git a/scripts/in_container/run_schema_defaults_check.py 
b/scripts/in_container/run_schema_defaults_check.py
   index bc7c1e2844..e974413436 100755
   --- a/scripts/in_container/run_schema_defaults_check.py
   +++ b/scripts/in_container/run_schema_defaults_check.py
   @@ -28,6 +28,7 @@ from __future__ import annotations
    
    import json
    import sys
   +from datetime import timedelta
    from pathlib import Path
    from typing import Any
    
   @@ -80,6 +81,8 @@ def get_server_side_operator_defaults() -> dict[str, Any]:
                        if isinstance(default_value, (set, tuple)):
                            # Convert to list since schema.json is pure JSON
                            default_value = list(default_value)
   +                    elif isinstance(default_value, timedelta):
   +                        default_value = default_value.total_seconds()
                        server_defaults[field_name] = default_value
    
            return server_defaults
   ```



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

Reply via email to