airflow icon indicating copy to clipboard operation
airflow copied to clipboard

AIP-38 | Add Task Instance Logs

Open bbovenzi opened this issue 11 months ago • 5 comments

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_wrap from useConfig to 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 Image

bbovenzi avatar Dec 04 '24 21:12 bbovenzi

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.

tirkarthi avatar Dec 05 '24 07:12 tirkarthi

Perhaps an expand icon button which will open the same logs but in a full page modal?

bbovenzi avatar Dec 05 '24 14:12 bbovenzi

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?

image

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 avatar Dec 20 '24 00:12 set92

@set92 good call. Updated for 3.0: https://github.com/apache/airflow/pull/45117

bbovenzi avatar Dec 20 '24 15:12 bbovenzi

@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. image

set92 avatar Dec 21 '24 12:12 set92

I believe we are only missing the colors on this one before closing ?

pierrejeambrun avatar Jan 06 '25 11:01 pierrejeambrun

I think we can close and make other issues for colors, groups, and filters

bbovenzi avatar Jan 07 '25 18:01 bbovenzi