Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error display for mirrord-container sidecar #2841

Conversation

DmitryDodzin
Copy link
Member

relevant for #2726

@DmitryDodzin DmitryDodzin marked this pull request as ready for review October 15, 2024 10:57
@Razz4780 Razz4780 requested a review from gememma October 15, 2024 12:56
@gememma
Copy link
Member

gememma commented Oct 17, 2024

@DmitryDodzin do you have any before/ after examples?

@DmitryDodzin
Copy link
Member Author

@DmitryDodzin do you have any before/ after examples?

Well right now any error there is a high likelihood that the container logs will be lost and only this error will be shown

Error:   × Comand failed to execute command [docker logs be6fe8a8bcc8bb8f721851fb5fd2c560666c0b03261f97c0db0dd94f74bf0e1f]: Error response from daemon: No such
  │ container: be6fe8a8bcc8bb8f721851fb5fd2c560666c0b03261f97c0db0dd94f74bf0e1f

this happens because the sidecar is deleted (due to --rm flag) before the <runtime> logs <container_id> is executed

This changes the command to use <runtime> logs -f <container_id> so the output can be something like

Error:   × Command output indicates an error [podman logs -f 7a3aaf9257b89b785074195b9a2bcdf85cb0f2e1895cbfc31e0815c40431f988]: thread 'main' panicked at mirrord/cli/src/internal_proxy.rs:130:5:
  │ test panic
  │ note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  │
  help: This is a bug. Please report it in our Discord or GitHub repository.

Copy link
Member

@gememma gememma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really nice 👍

@DmitryDodzin DmitryDodzin added this pull request to the merge queue Oct 21, 2024
Merged via the queue into metalbear-co:main with commit 8a5bb25 Oct 21, 2024
17 checks passed
@DmitryDodzin DmitryDodzin deleted the dimad/mbe-377-mirrord-containers-show-unintuitive-error branch October 21, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants