apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
36.34k stars 14.1k forks source link

wrong display of multiline messages in the log after filtering by message level #41265

Open Pad71 opened 1 month ago

Pad71 commented 1 month ago

Apache Airflow version

2.9.3

If "Other Airflow 2 version" selected, which one?

No response

What happened?

Problem displaying an error in the tab Logs in the task detail.

If the error text in the log is on multiple lines, it is displayed correctly in the basic view without filtering (see the picture) image

But if I use filter by message level (e.g. error, see the pict) , then only the first line of the same error message is displayed. The information on the other lines for this error message is not visible (see the picture) image

What you think should happen instead?

A multi-line message should be displayed in its entirety even after applying the message level filter

How to reproduce

Display a multi-line message (typically an error message) in the task log and then apply a filter to the ERROR level

Operating System

Linux

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

Code of Conduct

Pad71 commented 1 month ago

the same problem with displaying multiline message is also when filtering to other levels (e.g. INFO etc.)

Lee-W commented 1 month ago

Thanks for reporting this. I just verified this happens in the latest main (45658a8963761ce8a565b481156c847e493fce67)

Lee-W commented 1 month ago

cc @bbovenzi

bbovenzi commented 1 week ago

Talking with Ash about his TaskSDK work. Logs will be sent to the UI in json format so we won't need all of this regex string processing to try to add features to logs. But this is important enough to fix for 2.10.x or 2.11