SameerMesiah97 commented on code in PR #66856:
URL: https://github.com/apache/airflow/pull/66856#discussion_r3245095082
##########
providers/opensearch/src/airflow/providers/opensearch/log/os_json_formatter.py:
##########
@@ -32,9 +30,15 @@ class OpensearchJSONFormatter(JSONFormatter):
def formatTime(self, record, datefmt=None):
"""Return the creation time of the LogRecord in ISO 8601 date/time
format in the local time zone."""
- # TODO: Use airflow.utils.timezone.from_timestamp(record.created,
tz="local")
- # as soon as min Airflow 2.9.0
Review Comment:
> Thanks for the review. I initially tried to follow the TODO and use
`airflow.utils.timezone`, but the linter (Ruff) gave an error (TID251) and
recommended `airflow.sdk.timezone` instead. I also saw that other files in this
provider were already using the Task SDK, so I followed that pattern. I’ve also
moved the import inside the block to fix the `ImportError` in CI. Let me know
if you’d still like me to revert it to `utils`.
Okay. That makes sense. Thanks for clarifying that.
--
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]