kaxil commented on code in PR #56202:
URL: https://github.com/apache/airflow/pull/56202#discussion_r2388500044
##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -2095,6 +2096,9 @@ def _deserialize_field_value(cls, field_name: str, value:
Any) -> Any:
# Reuse existing timedelta deserialization logic
if value is not None:
return cls._deserialize_timedelta(value)
+ # Return default for retry_delay to prevent None values during
migration
+ if field_name == "retry_delay":
+ return DEFAULT_RETRY_DELAY
Review Comment:
No! Change the following
```diff
diff --git a/airflow-core/src/airflow/serialization/serialized_objects.py
b/airflow-core/src/airflow/serialization/serialized_objects.py
index a9a29a6b4d..2dbae45801 100644
--- a/airflow-core/src/airflow/serialization/serialized_objects.py
+++ b/airflow-core/src/airflow/serialization/serialized_objects.py
@@ -1291,7 +1291,7 @@ class SerializedBaseOperator(DAGNode,
BaseSerialization):
resources: dict[str, Any] | None = None
retries: int = 0
- retry_delay: datetime.timedelta
+ retry_delay: datetime.timedelta = datetime.timedelta(seconds=300)
retry_exponential_backoff: bool = False
run_as_user: str | None = None
```
##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -2095,6 +2096,9 @@ def _deserialize_field_value(cls, field_name: str, value:
Any) -> Any:
# Reuse existing timedelta deserialization logic
if value is not None:
return cls._deserialize_timedelta(value)
+ # Return default for retry_delay to prevent None values during
migration
+ if field_name == "retry_delay":
+ return DEFAULT_RETRY_DELAY
Review Comment:
It should handle this case
--
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]