-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
use containers/storage/pkg/fileutils/(Exists,Lexists) #22334
Conversation
Ephemeral COPR build failed. @containers/packit-build please check. |
Lot of complaining from CI about os.IsNotExist. Changes LGTM otherwise. |
dc8a4df
to
5aad981
Compare
8851e9e
to
5a22fc6
Compare
test/e2e/pull_test.go
Outdated
@@ -172,7 +172,7 @@ var _ = Describe("Podman pull", func() { | |||
session := podmanTest.Podman([]string{"pull", "-q", "--authfile", "/tmp/nonexistent", ALPINE}) | |||
session.WaitWithDefaultTimeout() | |||
Expect(session).To(ExitWithError()) | |||
Expect(session.ErrorToString()).To(Equal("Error: credential file is not accessible: stat /tmp/nonexistent: no such file or directory")) | |||
Expect(session.ErrorToString()).To(MatchRegexp("Error: credential file is not accessible: (faccessat|stat) /tmp/nonexistent: no such file or directory")) |
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.
Why can this both? This makes testing the error message much more complicated.
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.
wanted to reduce tests failures in case we end up bisecting c/storage, but probably not worth the cost of dealing with regex.
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.
on Windows we still use stat. Is it something to worry about?
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.
We do not run these outside of linux so not really IMO. I really do not like to add additional complexity to the tests.
For example see #22346 where it would add quite a bit of work to add regex logic.
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 still think this is a problem, I don't like having to write regex for all the error messages even when we know we always expect faccessat as we only run the tests on linux but I like to know what @edsantiago thinks about this.
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.
Under what circumstances will tests see stat
? I too am strongly against the use of regex. It will disasterify a lot of my upcoming test cleanup.
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.
Never, my understanding stat is only used on native windows platforms. Everwhere else it uses faccess (Linux, Darwin) Probably freebsd as well.
14ae0f3
to
cdb5d44
Compare
we need containers/buildah#5469 first |
Is this something we should meantion to RHIVOS as a potentially speedup of podman container start? |
I doubt that this has a measurable impact over the whole container start duration. |
Cockpit tests failed for commit f86b67a6f1299c4bbf8d42422d1ef1753993fac0. @martinpitt, @jelly, @mvollmer please check. |
setting |
podman 5.1 [1], by way of [2], adds a "StartInterval" element to the `.Config.Healthcheck` API field. This is an API breakage, but accept either form until 5.1 is available on all OSes. [1] containers/podman#22334 [2] containers/image@b6afa8c
OK, I sent cockpit-project/cockpit-podman#1666 to accept either output format. This is an API break, let's hope it doesn't affect actual users.. |
podman 5.1 [1], by way of [2], adds a "StartInterval" element to the `.Config.Healthcheck` API field. This is an API breakage, but accept either form until 5.1 is available on all OSes. [1] containers/podman#22334 [2] containers/image@b6afa8c
That cockpit-podman PR landed, so please retry the cockpit-devdeps tests or force-push. (Or decide that it's an API break and not actually land it, of course :grin) |
This is not an API break! This is adding a new field to a structure, if client code cannot handle that then it's parsing is broken. We add new fields all the time. If you want specific fields only then you should query only the fields you needs to check, i.e. |
Ack -- the PR landed now, so a |
restarted the tests |
The change in healthcheck_run_test.go, depends on the containers/image change: commit b6afa8ca7b324aca8fd5a7b5b206fc05c0c04874 Author: Mikhail Sokolov <msokolov@evolution.com> Date: Fri Mar 15 13:37:44 2024 +0200 Add support for Docker HealthConfig.StartInterval (v25.0.0+) Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Ephemeral COPR build failed. @containers/packit-build please check. |
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: giuseppe, Luap99 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 |
db93e2c
into
containers:main
use a faster alternative to os.Stat and os.Lstat to check whether a path is present
Does this PR introduce a user-facing change?