serverless / compose

Orchestrate Serverless Framework in monorepos
https://serverless.com/framework/docs/guides/compose
MIT License
111 stars 15 forks source link

fix: Improve non-progress errors #78

Closed pgrzesik closed 2 years ago

pgrzesik commented 2 years ago

Non-progress error formatting (inline): 06DD4E63-F28E-44F1-859C-8BA854A34B9B

In-progress error formatting: 59D90247-0E32-4FD0-BB75-7EA29D9E3CB0_4_5005_c

Details in verbose: D1E74C94-9D60-46D5-9B5A-1D3F7DCBF2AC_4_5005_c

I also have a more general question - should we flush all final states of progresses to verbose as well? Currently, we don't do that which might be confusing to users that expect full information in verbose logs cc @mnapoli

Closes: #53

mnapoli commented 2 years ago

should we flush all final states of progresses to verbose as well? Currently, we don't do that which might be confusing to users that expect full information in verbose logs cc @mnapoli

Yes 💯

Actually I think what we should do is that when the Progresses is stopped (method stopAll IIRC), it should refresh one last time but this time it should write to output.stderr instead of output.interactiveStderr. I'm talking about this line specifically:

https://github.com/serverless/compose/blob/6f19215b1c69d0bb0ceb9ca75750b001567b816e/src/cli/Progresses.js#L245

That will cause:

This is something I wanted to address in #67 but it was even a bigger refactoring so I left it out. Feel free to tackle this!

pgrzesik commented 2 years ago

This is something I wanted to address in https://github.com/serverless/compose/pull/67 but it was even a bigger refactoring so I left it out. Feel free to tackle this!

I'll try to tackle this as a part of this PR 👍

pgrzesik commented 2 years ago

After looking a bit more into that - I think it would be better to move flushing all verbose logs from progressed outputs to file to a separate PR as I need to dive deeper into the current logic and better grasp how it's all working.