hkc-8010 commented on PR #69307: URL: https://github.com/apache/airflow/pull/69307#issuecomment-4958113152
@Vamsi-klu Good catch on the code path. I left the timestamp as-is on purpose here: in both handlers the timestamp is not user data. It is written by `OpensearchJSONFormatter.formatTime()` (Elasticsearch uses the same pattern) from `record.created`, so it is always a valid ISO-8601 string. The only field a user can put arbitrary values in is `event`, for example logging a list or dict, which is what the fallback and the test cover. A timestamp that fails validation would have to come from documents written into the index by something outside Airflow's own formatter. That is out of scope for this fix, so I would rather keep the fallback narrow. If we want to harden against externally ingested log docs, I am happy to do that as a follow-up. -- 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]
