-
Notifications
You must be signed in to change notification settings - Fork 280
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
fix: load compose logs async not await #3377
Conversation
await window.logsContainer(container.engineId, container.id, logsCallback); | ||
// Get the logs for the container asynchronously / all at the same time | ||
// this will update the terminal as the logs come in. | ||
window.logsContainer(container.engineId, container.id, logsCallback); |
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 there is a missing catch here
( I think an eslint rule is still not applied but it would fail)
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.
it requires promise.catch(your code) not try { } catch
16ae392
to
6f5b0cf
Compare
### What does this PR do? * Loads all the compose containers asynchronously rather than using await. * Adds simple tests for No logs, however, will have to add integration test for loading logs correcctly ### Screenshot/screencast of this PR <!-- Please include a screenshot or a screencast explaining what is doing this PR --> ### What issues does this PR fix or reference? <!-- Please include any related issue from Podman Desktop repository (or from another issue tracker). --> Closes containers#3349 ### How to test this PR? <!-- Please explain steps to reproduce --> 1. Test using Docker Compose example: https://gist.githubusercontent.com/benoitf/a94cff3545cb0992007dd1fc58287816/raw/d0b33311834d84ec1d6830b32a167af80c84926e/docker-compose-example.yaml 2. Compose logs will appear asynchronously now / while podman desktop retrieves the logs, rather than await for each container 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.
fix: load compose logs async not await
What does this PR do?
test for loading logs correcctly
Screenshot/screencast of this PR
Screen.Recording.2023-07-31.at.12.03.03.PM.mov
What issues does this PR fix or reference?
Closes #3349
How to test this PR?
retrieves the logs, rather than await for each container
Signed-off-by: Charlie Drage charlie@charliedrage.com