-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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: improved "containers/{name}/wait" endpoint #10271
fix: improved "containers/{name}/wait" endpoint #10271
Conversation
/cc @mheon |
4acf161
to
dd614e4
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.
One Nit
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matejvasek, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Looks like this could leak goroutines - think you need to close the channel
once you have the event so event reading terminates
…On Sat, May 8, 2021 at 06:19 Daniel J Walsh ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkg/api/handlers/utils/containers.go
<#10271 (comment)>:
> @@ -7,6 +7,8 @@ import (
"strconv"
"time"
+ "github.com/containers/podman/v3/libpod/events"
+
LGTM
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10271 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCBTP4PTDYMRN4XOT2DTMUF2ZANCNFSM44LACLWA>
.
|
@mheon Good catch. Closing the eventChannel would cause |
@mheon Edit: my bad it works |
ebd088d
to
e26ba89
Compare
72f22b6
to
2141918
Compare
Using event API to detect changes to container instead of polling. Polling was unreliable, sometime change of a state might have been missed. Signed-off-by: Matej Vasek <[email protected]>
2141918
to
66e38ca
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.
LGTM, thank you!
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matejvasek, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fedora-33 root test is failing and I don't think it's a flake.
|
@TomSweeneyRedHat yes, "open state file" is a flake, we hope it's fixed in containers/crun#661 but I assume it will take a VM-rebuild dance to get it fixed in CI. |
/hold cancel |
Previous implementation wasn't working with short living containers.
Polling missed the very brief moment the container was running.
Now
Event
API is used instead of polling.resolves #10256