metalbear-co / mirrord

Connect your local process and your cloud environment, and run local code in cloud conditions.
https://mirrord.dev
MIT License
3.7k stars 100 forks source link

CLI final error is not printed in JSON format when using JSON progress mode #2127

Open Razz4780 opened 8 months ago

Razz4780 commented 8 months ago

Bug Description

image

Probably because this error goes up the stack beyond main

Steps to Reproduce

  1. Set MIRRORD_PROGRESS_MODE
  2. Run mirrord exec against a non-existent target

Backtrace

No response

Relevant Logs

No response

Your operating system and version


Local process


Local process version

No response

Additional Info

No response

eyalb181 commented 8 months ago

@Razz4780 What does this affect? Error looks bad in the IDE?

Razz4780 commented 7 months ago

@Razz4780 What does this affect? Error looks bad in the IDE?

Found the source of the mess.

The error notification actually looks fine, because in ext and ls subcommands the error is actually always printed as JSON. Other subcommands print the errors in the rich console-friendly format (one from the issue description). Generally - there's some mess around logging in the CLI. Also using mirrord-console affects this behavior.

This issue is not very serious, I think the biggest impact is that mirrord ls always print the final error as JSON (even when used from the console).

eyalb181 commented 7 months ago

Okay, since there's no user impact I'm deprioritizing this