ferruzzi commented on code in PR #34747:
URL: https://github.com/apache/airflow/pull/34747#discussion_r1346190563
##########
airflow/providers/amazon/aws/log/cloudwatch_task_handler.py:
##########
@@ -33,6 +33,24 @@
from airflow.models import TaskInstance
+def json_serialize_legacy(o):
+ """Json serializer replicating legacy watchtower behavior.
+
+ The legacy `[email protected]` json serializer function that serialized
+ datetime objects as ISO format andall other non-JSON-serializable to
`null`.
+ """
+ if isinstance(o, (date, datetime)):
+ return o.isoformat()
+
+
+"""json serializer replicating current watchtower behavior
Review Comment:
```suggestion
"""
json serializer replicating current watchtower behavior
```
I'm surprised the style checks didn't get angry at this, perhaps that is one
of the checks that are not yet enabled, but first line of the docstring needs
to be on a newline.
--
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]