github-actions[bot] opened a new pull request, #58399: URL: https://github.com/apache/airflow/pull/58399
The function would fail with 'TypeError: content.split is not a function' when data was not a string but also didn't have a content property. Changes: - Add type guard to check if data is string before calling .split() - Add support for single log line objects (return as array) - Simplify logic with early returns for clearer flow - Add comprehensive test suite covering all edge cases The function now handles: 1. Data with content property (returns as-is) 2. String data (parses as newline-separated JSON) 3. Object data without content (returns wrapped in array) 4. Edge cases (undefined, null, numbers, invalid JSON) (cherry picked from commit a3982018c982d082a0ae553b0f0faa307ac6c9c1) Co-authored-by: Felix Uellendall <[email protected]> -- 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]
