ferruzzi commented on code in PR #53951:
URL: https://github.com/apache/airflow/pull/53951#discussion_r2255554213
##########
task-sdk/src/airflow/sdk/definitions/deadline.py:
##########
@@ -134,11 +136,96 @@ def deserialize_deadline_alert(cls, encoded_data: dict)
-> DeadlineAlert:
return cls(
reference=reference,
interval=timedelta(seconds=data[DeadlineAlertFields.INTERVAL]),
- callback=data[DeadlineAlertFields.CALLBACK], # Keep as string path
- callback_kwargs=data[DeadlineAlertFields.CALLBACK_KWARGS],
+ callback=cast("Callback",
deserialize(data[DeadlineAlertFields.CALLBACK])),
)
+class Callback(ABC):
Review Comment:
We had a chat offline, I'm rescinding my suggestion. Even if someone wants
to make a more generic airflow callback,. it doesn't get much more generic than
path and kwargs. They can adopt this one and move it somewhere more central.
--
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]