airflow
airflow copied to clipboard
AIP-38 | Add Task Instance Logs
After https://github.com/apache/airflow/pull/44656 is merged we will have a placeholder page for task logs. We should reimplement the task logs page here.
- check if the TI try_number > 1. Then use the public rest api to fetch all previous tries and render a TryNumber selector. The selector should default to the latest try
- use the public rest api endpoint to fetch logs by task instance try
- get
default_wrapfromuseConfigto have the wrap checkbox checked or not
We can leave file source and log level alone for now since that should be filters done by the backend. Also there will be no "see more" button.
Optional to include colored log lines in this PR or in a subsequent one. https://github.com/apache/airflow/issues/43541
Legacy UI view
It will be good to have a full screen view of the logs at least without the filters like graph modal which was one of the requested features as legacy logs UI was relatively full screen.
Perhaps an expand icon button which will open the same logs but in a full page modal?
I was searching for the exact Issue, but I couldn't find it. I was testing today AF 2.10.4, and I found that when you have more than 10 fails in a task, the buttons are replaced by a dropdown list?
If you get to that number of tries is most probably because you are debugging, so you don't want more steps to go to your last log error. So, from this point of view I see 2 improvements
- Make the order in reverse. Probably will be weird, but if you are with an error, you want to select the last error log as soon as possible, and when you have to select the dropdown list, and then go to select the last element is not very nice or comfortable. Other option would be to put a limit or make the list smaller to only shows 5 elements, and have a scrollbar.
- The other option would be to have both, the dropdown, and the last or the last 3 log error. Which will appear on the right side of the dropdown. This way it is easier to see error logs, that's most people are interested in. But, if you want to check previous ones, you still have the dropdown.
@set92 good call. Updated for 3.0: https://github.com/apache/airflow/pull/45117
@bbovenzi Great, thanks! Although I feel the other option would have been better in functionality. Although more complex in terms of UI, and therefore harder to maintain.
In case it was not clear what I meant, I did a quick draw. We would have the dropdown with all the task tries. But at a side, also the latest tries (they can be the last 3, 5 or customizable by config up to a number), which will allow to quickly select them, without having to open the dropdown.
I believe we are only missing the colors on this one before closing ?
I think we can close and make other issues for colors, groups, and filters