-
Notifications
You must be signed in to change notification settings - Fork 173
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
Add a --debug
flag to the CLI to help retrieve more logs.
#941
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a nice step towards getting debug logs from users without asking them to run weird Docker/Podman commands. I've commented on a few things that we can improve, but overall I like where this is going.
dangerzone/conversion/errors.py
Outdated
def __str__(self): | ||
msg = f"{self.error_message}" | ||
if self.logs: | ||
msg += f" {self.logs}" | ||
return msg | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, this may be an overly verbose string representation of the exception. Still, I think I get why you opted to go down that road. We have a bug in the way we handle container logs on error. Basically, we don't print them to the user, even if sys.dangerzone_dev == True
.
I've fixed this in #748, but it's tied to having a single container, so I can't easily cherry-pick it. Let's discuss how we can proceed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! I believe one simple way to handle this is to wait until #748 is merged, and then rebase this branch on top of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that container errors are now reported on the main
branch. Give it a look and let me know if not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR will need some revisit at some point, as the main point is to add RUNSC_DEBUG=1
info to the output, making it possible to run by end users without having to do a lot of copy/paste.
When I tried to rebase this on top of the latest main, it seemed that the run was now blocked, and I didn't investigated further yet.
This seems correlated to #442. |
We had a discussion with Alexis. He mentioned that adding the |
When the flag is set, the `RUNSC_DEBUG=1` environment variable is added to the outer container
I've rebased this branch on top of the latest |
While adding Github Issue Templates on this repository (#939) we found that the commands we require the user to enter in their terminals can be quite complex. Some of them might require some bash-fu, for instance to define the location of the custom seccomp profile we are using, as it differs depending the OS.
This is a proposal to add a
--debug
flag to thedangerzone-cli
to simplify the process of generating proper logs.When the flag is set:
RUNSC_DEBUG=1
environment variable is added to the outer container ;Info: tests are currently failing and I didn't put too much effort in making them pass, as this is here mainly to see if it could make sense to add this in the first place.