-
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 image filters parsing #21260
Fix image filters parsing #21260
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: umohnani8 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 |
Need to wait on containers/common#1800 before merging |
0ff7f6b
to
e3f9ca5
Compare
e3f9ca5
to
2bfa4b1
Compare
Pull in updates made to the filters code for images. Filters now perform an AND operation except for th reference filter which does an OR operation for positive case but an AND operation for negative cases. Signed-off-by: Urvashi Mohnani <[email protected]>
Fix the image filter parsing in the common libraries to follow an AND logic for all filters passed in ensuring compatibility with Docker behavior. Also fix the filter parsing on the tunnel side so that we grab all the filters given by the user and not only the last filter in the list. Add tests for the fixes. Signed-off-by: Urvashi Mohnani <[email protected]>
2bfa4b1
to
38893a9
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.
This is an improvement, but I can’t see how it could fix https://github.com/containers/podman/pull/21359/checks?check_run_id=20847280131 . In there we have a spurious match, not a spurious mismatch.
Since images can have multiple digests, it is better to compare the image ID as that will definitely change on an update and each image can only have one ID. Signed-off-by: Urvashi Mohnani <[email protected]>
38893a9
to
848078c
Compare
is "$output" "$expected" | ||
run_podman container inspect $randomname --format "{{.ImageDigest}}" | ||
assert "$output" =~ "$expectedDigests" |
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 would also allow a match against the repo name part of RepoDigests
. That’s not quite clean, but it might be sufficient given the test description.
Either way, let’s see if this version works :)
Given that we can have multiple image digests, fix the inspect test to check whether the digest given matches one of the digests of the image. Signed-off-by: Urvashi Mohnani <[email protected]>
e801e9e
to
202cab6
Compare
@mheon @ashley-cui tests are happy now with the c/common bump. We just need bloat approval, PTAL |
Excellent, thanks! LGTM |
Adding bloat approved. |
Changes LGTM |
@umohnani8 ^^ |
I think the machine test failures are expected. All other tests are green now. |
WSL and HyperV should be passing |
/lgtm |
I can reproduce the win failure locally, taking a look.... |
Looks like the error comes from this pr, on line 297. This is called by the windows client while reading containers.conf @giuseppe, should getRootlessDirInfo() be reinstated, or is there something else we can do? |
/unhold |
d7bf138
into
containers:main
I don't think this should have merged, the windows failure is real. c/common is broken right now because of c/storage. |
can we fix it in c/storage? What is the expected result on windows? |
We need to be able to get the rootlessruntimedir in so that we can read containers.conf on the client side for windows. |
We either fix it in c/storage there, or c/common here, and not use the function from c/storage. containers/common@ff1039a |
Fixing in c/storage seems safer, we don't know what other places will try and call it |
( |
Do I undestand correctly that we are trying to compute c/storage options when setting up a |
Fix the image filter parsing in the common libraries
to follow an AND logic for all filters passed in ensuring
compatibility with Docker behavior.
Also fix the filter parsing on the tunnel side so that we grab
all the filters given by the user and not only the last filter
in the list.
Add tests for the fixes.
Fixes #18412
Does this PR introduce a user-facing change?