amoghrajesh commented on code in PR #61118:
URL: https://github.com/apache/airflow/pull/61118#discussion_r2735017854
##########
airflow-core/tests/unit/serialization/test_serialized_objects.py:
##########
@@ -485,14 +485,16 @@ def test_serialize_deserialize_deadline_alert(reference):
callback=AsyncCallback(empty_callback_for_deadline,
kwargs=TEST_CALLBACK_KWARGS),
)
- serialized = original.serialize_deadline_alert()
+ # Use BaseSerialization like assets do
+ serialized = BaseSerialization.serialize(original)
assert serialized[Encoding.TYPE] == DAT.DEADLINE_ALERT
assert set(serialized[Encoding.VAR].keys()) == public_deadline_alert_fields
- deserialized = DeadlineAlert.deserialize_deadline_alert(serialized)
+ deserialized = BaseSerialization.deserialize(serialized)
assert deserialized.reference.serialize_reference() ==
reference.serialize_reference()
assert deserialized.interval == original.interval
- assert deserialized.callback == original.callback
+ # Callback is deserialized as SerializedDeadlineAlert, which may have
different callback representation
Review Comment:
It's actually supposed to be the same, this was when I was exploring some
other option to support callback serialisation for callbacks. Now I am just
using serde like earlier.
--
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]