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
feat: Add gather & download logs button in troubleshooting #5119
Conversation
includes on macOS
|
5ce4380
to
b8e3aaf
Compare
Ready for review! Would like some input on how to improve the UI as well as other logs we should be collecting (Windows and Linux specifically). In a later PR we should implement methods for extensions to add what logs they'd also like to have in the .zip |
145b098
to
c6e6b35
Compare
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 review is going to jump around a lot, sorry in advance. :)
+1 to all the basic parts (zip, file dialog, etc) being there. It works!
Title: I know this as 'must gather' from the past 20 years and the name kinda sticks, but like 'onboarding' I don't know if the average user knows the term. Maybe something like "Gather Log Files" would be enough with an expanded description? e.g. "Bundle all log files into a zip for future (or offline?) problem determination".
From a core/UI standpoint I don't know when we'd ever want just console logs or just system logs, plus we'll have extension logs, etc. I think it's probably simpler if index.ts just exposes a 'getLogs', and if we ever need something more fine-grained it could have optional parameters in the future.
Going a step further I think it's nice it shows you a list of files that it's going to zip and uses mono-font to list them - but I think the usage pattern is always to click one, then the other. I'm wondering if we should even bother having a Collect Logs button and exposing it through the API, or just have a single button? Or maybe a single button and it just gives you a summary of the files that it included after.
We're a desktop app, so a "Download" button is a bit out of place. Maybe just "Save"?
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.
Missing implementations
a0f8ce7
to
457126a
Compare
Ready for another review 👍 / UI updated to use the new "tabbed" logs. |
Done! Ready for another review. Put it down to one API call (that also gets the console logs via memoryLogs). |
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.
Thanks for all the changes, this is much simpler and cleaner to me now. I'd still appreciate a couple more minor tweaks as listed.
packages/renderer/src/lib/troubleshooting/TroubleshootingGatherLogs.svelte
Outdated
Show resolved
Hide resolved
### What does this PR do? * Adds a button to collect logs which is currently only hardcoded to retrieve the console logs * Adds a button to download the logs as a zip file with all logs stored within as a .txt file * Shows which files have been generated and what will be zipped. ### Screenshot / video of UI <!-- If this PR is changing UI, please include screenshots or screencasts showing the difference --> ### What issues does this PR fix or reference? <!-- Include any related issues from Podman Desktop repository (or from another issue tracker). --> Closes containers#5048 ### How to test this PR? <!-- Please explain steps to reproduce --> 1. Go to troubleshooting 2. Click the collect logs & download logs buttons. Signed-off-by: Charlie Drage <charlie@charliedrage.com>
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.
Thanks for all the changes, LGTM.
packages/renderer/src/lib/troubleshooting/TroubleshootingGatherLogs.svelte
Outdated
Show resolved
Hide resolved
packages/renderer/src/lib/troubleshooting/TroubleshootingGatherLogs.svelte
Outdated
Show resolved
Hide resolved
packages/renderer/src/lib/troubleshooting/TroubleshootingGatherLogs.svelte
Outdated
Show resolved
Hide resolved
packages/renderer/src/lib/troubleshooting/TroubleshootingGatherLogs.svelte
Outdated
Show resolved
Hide resolved
Co-authored-by: Florent BENOIT <fbenoit@redhat.com> Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Co-authored-by: Florent BENOIT <fbenoit@redhat.com> Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Co-authored-by: Florent BENOIT <fbenoit@redhat.com> Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Co-authored-by: Florent BENOIT <fbenoit@redhat.com> Signed-off-by: Charlie Drage <charlie@charliedrage.com>
…rLogs.svelte Co-authored-by: Florent BENOIT <fbenoit@redhat.com> Signed-off-by: Charlie Drage <charlie@charliedrage.com>
…rLogs.svelte Co-authored-by: Florent BENOIT <fbenoit@redhat.com> Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Co-authored-by: Florent BENOIT <fbenoit@redhat.com> Signed-off-by: Charlie Drage <charlie@charliedrage.com>
@benoitf thank you for the review! implemented all the requested changes and it's ready for another 👍 |
1dd76fa
to
3a05a8c
Compare
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.
if you can update glitches like copyright date, formatting the license, and fileName -> filename before merging
else 👍
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Updated based on the changes, thank you for the reviews! Enabling auto-merge now 🎉 |
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 noticed that packages/renderer/src/lib/troubleshooting/TroubleshootingGatherLogs.svelte has no unit test
feat: Add gather & download logs button in troubleshooting
What does this PR do?
retrieve the console logs
within as a .txt file
Screenshot / video of UI
Screen.Recording.2023-12-05.at.2.23.40.PM.mov
What issues does this PR fix or reference?
Closes #5048
How to test this PR?