-
Notifications
You must be signed in to change notification settings - Fork 90
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 race condition in testLifecycleOperations, Serialize updateContainer() calls, Ignore irrelevant container events #1353
Conversation
The initial container gets started and immediately stopped via the CLI. The events propagate through the UI asynchronously, so strengthen the initial wait to ensure that the container is actually shown as "Exited". Otherwise it could still be "Running" in the UI, and trying to open the action menu would not show "Start".
With a burst of events these get called in parallel. But podman does not return them in the call order [1], which led to non-current state updates. [1] containers/podman#19124
a8183c4
to
c10a8aa
Compare
testHealthcheck is still very flaky. But that already happens on main, investigating in #1324 (comment) . So retrying. |
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.
Looks good! The last commit with ignoring events may be potentially dangerous, see my comment
These are internal transient states which don't need to reflect in the UI. They happen quickly in bursts, with a "permanent state" event following such as "create", "died", or "remove". This helps to reduce the API calls and thus mitigates out-of-order results; see containers/podman#19124 We are not really interested in `podman exec` events, so we would like to ignore `exec_died` along with `exec`. However, it is the only thing that saves us from inconsistent `health_state` events (see containers/podman#19237). So we cannot rely on the latter event, but instead have to do a full update after each `exec_died`, as some of them are the health checks. Also fix the alphabetical sorting of the remaining events.
Argh, this makes the health check tests more flaky, especially on ubuntu-2204 (but not limited to that). I analyzed that in #1324 (comment) , reported it as containers/podman#19237 , and documented our accidental workaround explicitly. Now we are back to the status quo of "the test flake a lot", instead of "all the time on ubuntu-2204" 😢 |
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 am so sorry you have to deal with this :/ Thanks!
No description provided.