Skip to content
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

api: fix parsing filters #18345

Merged
merged 1 commit into from
May 2, 2023
Merged

Conversation

vrothberg
Copy link
Member

@vrothberg vrothberg commented Apr 25, 2023

Podman and Docker clients split the filter map slightly different, so
account for that when parsing the filters in the image-listing endpoint.

Fixes: #18092

Does this PR introduce a user-facing change?

Fix parsing multi-value filters in the REST API.

@openshift-ci openshift-ci bot added release-note approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 25, 2023
@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Apr 25, 2023
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vrothberg
Copy link
Member Author

Will continue next week o/

@vrothberg
Copy link
Member Author

vrothberg commented May 2, 2023

Turns out Docker and Podman clients split the keys/values slightly different. FWIW, I think the Podman filters are broken as there is now way to know whether, for instance, we want to filter one label as label=foo (without a value) or two labels.

But I am not opening this box now.

pkg/domain/infra/abi/images_list.go Outdated Show resolved Hide resolved
pkg/util/filters.go Outdated Show resolved Hide resolved
@Luap99
Copy link
Member

Luap99 commented May 2, 2023

Turns out Docker and Podman clients split the keys/values slightly different. FWIW, I think the Podman filters are broken as there is now way to know whether, for instance, we want to filter one label as label=foo (without a value) or two labels.

But I am not opening this box now.

I am fine with no fixing it in this PR but can you create an issue? This sounds like big deal to me.

@vrothberg
Copy link
Member Author

I am fine with no fixing it in this PR but can you create an issue? This sounds like big deal to me.

Definitely. Wanted to do this in any case it made me feel quite uncomfortable, see #18412.

Podman and Docker clients split the filter map slightly different, so
account for that when parsing the filters in the image-listing endpoint.

Fixes: containers#18092
Signed-off-by: Valentin Rothberg <[email protected]>
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99, vrothberg

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vrothberg
Copy link
Member Author

@rhatdan PTAL

@vrothberg
Copy link
Member Author

@containers/podman-maintainers PTAL

@rhatdan
Copy link
Member

rhatdan commented May 2, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 2, 2023
@openshift-merge-robot openshift-merge-robot merged commit 0851d64 into containers:main May 2, 2023
@vrothberg vrothberg deleted the fix-18092 branch May 3, 2023 06:57
@vrothberg
Copy link
Member Author

/cherry-pick v4.5

@openshift-cherrypick-robot
Copy link
Collaborator

@vrothberg: new pull request created: #18432

In response to this:

/cherry-pick v4.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Aug 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/api-change Change to remote API; merits scrutiny lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image Filtering Incompatability with Docker API
5 participants