-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fail earlier when no containers exist in stats #22707
Conversation
@edsantiago PTAL |
LGTM! Thank you! |
Fixes: #22612 |
Ephemeral COPR build failed. @containers/packit-build please check. |
Cockpit tests failed for commit 5cf82c6. @martinpitt, @jelly, @mvollmer please check. |
test/e2e/stats_test.go
Outdated
@@ -25,10 +25,6 @@ var _ = Describe("Podman stats", func() { | |||
session := podmanTest.Podman([]string{"stats", "--no-stream", "123"}) | |||
session.WaitWithDefaultTimeout() | |||
expect := `unable to get list of containers: unable to look up container 123: no container with name or ID "123" found: no such container` |
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.
As long as you have to repush, though, might as well move the string below into ExitWithError()
, and get rid of the temporary variable...
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 is changing the behavior, if you get the list of containers before the loop it will not update on each inteerval which means newly created contianer will not be added later which is wrong.
The proper way to fix is doing something like this for stats as well. #22691
026052f
to
0851695
Compare
Ephemeral COPR build failed. @containers/packit-build please check. |
Cockpit tests failed for commit 026052f. @martinpitt, @jelly, @mvollmer please check. |
Cockpit tests failed for commit 0851695. @martinpitt, @jelly, @mvollmer please check. |
23d9c2b
to
8e7cc2e
Compare
Ephemeral COPR build failed. @containers/packit-build please check. |
Cockpit tests failed for commit 23d9c2b. @martinpitt, @jelly, @mvollmer please check. |
Cockpit tests failed for commit 8e7cc2e. @martinpitt, @jelly, @mvollmer please check. |
The ELN copr environment fixes should land today/tomorrow so ignore failures for now. |
@martinpitt the cockpit tests on rawhide have been failing consistently recently. PTAL. |
Ephemeral COPR build failed. @containers/packit-build please check. |
Hey, sorry we had some issues with the new systemd release landing in rawhide. The tests should run 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.
API tests are failing,
unable to look up container [$cid]
looks like a bug in the tests, a caliss case of not checking the output/error message.
6965b8c
to
1e1df0f
Compare
@Luap99 PTAL |
test/apiv2/20-containers.at
Outdated
else | ||
t GET libpod/containers/stats?containers='[$cid]' 409 | ||
t GET "libpod/containers/stats?containers=$cid&stream=false" 200 |
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 guess this still returns 409 for cgroup v1, we just don't test cgroupv1 in CI for the pai tests so we don't notice I guess and we in the process of dropping all cgroupv1 testing so I guess you might as well just drop all the conditionals
Signed-off-by: Daniel J Walsh <dwalsh@redhat.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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, 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 |
/lgtm |
241821b
into
containers:main
Does this PR introduce a user-facing change?