-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
WIP Refactor filtering moving from CLI to server #2201
Conversation
@baude I uploaded the WIP so you can review where I'm going |
libpod/runtime_ctr.go
Outdated
@@ -436,7 +437,7 @@ func (r *Runtime) LookupContainer(idOrName string) (*Container, error) { | |||
// Filters can be provided which will determine what containers are included in | |||
// the output. Multiple filters are handled by ANDing their output, so only | |||
// containers matching all filters are returned | |||
func (r *Runtime) GetContainers(filters ...ContainerFilter) ([]*Container, error) { | |||
func (r *Runtime) GetContainers(filters ...filterable.Filter) ([]*Container, error) { |
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 think we can keep the definition for ContainerFilter in libpod - anything that matches the signature will be treated by Go as a ContainerFilter, even if it's defined in another package
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.
Oh, I see you redefined it. Hmmm.
Can we have filterable.Filter produce a ContainerFilter instead? I kind of like arbitrary-function interface we have going on here, and I'd like to keep it if we're retaining filtering.
50c797d
to
10c91e3
Compare
☔ The latest upstream changes (presumably #2274) made this pull request unmergeable. Please resolve the merge conflicts. |
10c91e3
to
46788ea
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jwhonce If they are not already assigned, you can assign the PR to them by writing 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 |
* Filter on server side to reduce amount of data pushed over Varlink Signed-off-by: Jhon Honce <jhonce@redhat.com>
46788ea
to
a1bc0b5
Compare
@jwhonce: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
@jwhonce: PR needs rebase. 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. |
@jwhonce Are you still working on this? |
We went a different direction. |
Signed-off-by: Jhon Honce jhonce@redhat.com