gitpod icon indicating copy to clipboard operation
gitpod copied to clipboard

Show prebuild logs for all tasks

Open jldec opened this issue 3 years ago • 8 comments

The prebuild logs viewer in workspace startup, and in project prebuilds, only shows the logs for the first tasks. This makes it difficult to debug prebuilds in workspaces with multiple tasks, e.g. multi-repo workspaces.

Since tasks can run in parallel, there need to be multiple log display areas in the page. I quite like the way the werft UI does this.

Screenshot 2022-05-13 at 09 48 28

cc: @gtsiolis

Front logo Front conversations

jldec avatar May 13 '22 08:05 jldec

This would be extremely helpful since if a prebuild step fails that isn't the first task in the list, you have to debug by re-ordering the task list so that the failing task is the first task. Also if the first task is faster than other tasks, it seems like the prebuild has hung, when actually it's just working on something else that the user can't see

cooperbenson-qz avatar May 24 '22 16:05 cooperbenson-qz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 24 '22 23:09 stale[bot]

Another user request for this [1] (internal)

jldec avatar Dec 23 '22 12:12 jldec

Just to help anyone in the same place here. It's actually do-able already via API calls their web makes.

If you watch the calls when you open the Prebuild log page you'll see a call to https://gitpod.io/headless-log-download/0971....-....-....-....-........baa3/0.

If you swap out the 0 at the end of all that for n+1 you get the other logs.

I had to blank the GUID because the links are also not secured.

I'll try put together a PR if I find some time over the next month.

moritonal avatar Feb 16 '23 13:02 moritonal

Is there any chance that we'll see a solution here? It's very tricky to debug a failed prebuild. The solution from @moritonal only works for succeeded prebuilds in my case. Failed prebuilds unfortunately don't show any output.

JuJup avatar Sep 14 '23 16:09 JuJup

You can reproduce a prebuild locally from the workspace with gp validate --prebuild --headless. See more info about gp validate: https://www.gitpod.io/docs/configure/workspaces#validate-your-gitpod-configuration

akosyakov avatar Sep 14 '23 16:09 akosyakov

Thanks for the fast answer. I knew the gp validate command, but due to some mysql errors that I mentioned here I couldn't test my setup this way.

However, the --headless option was new for me and did the trick for me. Thanks for that! Unfortunately, this is not documented in the CLI itself and I couldn't find anything about that option in your documentation - maybe this could be added. Would have saved me a lot of time and some headaches before 😄

EDIT: Ok, the mysql problem seems to occur there as well, but I was able to easily see my current problem in the logs :)

JuJup avatar Sep 14 '23 17:09 JuJup

It is strange --headless simply prevent IDEs to start. But maybe again shell scripts races are causing some weirdness.

akosyakov avatar Sep 15 '23 07:09 akosyakov