-
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
Allow filtering containers by command #24791
base: main
Are you sure you want to change the base?
Conversation
63e80c1
to
7a8043c
Compare
the change LGTM, but you'll need to update the man pages too |
Thank you!
Could you please me an advice how to fix it? |
7a8043c
to
899381e
Compare
899381e
to
fe91b75
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: arsenalzp The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e299759
to
39bf186
Compare
All objections were removed, all applicable filters were applied for external containers with corresponding tests. |
Looks like you did not update man pages correctly. |
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 isn't really what I had in mind since it still duplicates all the filtering functions.
My idea was to define a interface for the filter function type
func(container *libpod.Container) bool
, i.e. instead of using the Container struct it just accept and interface the implements all the access methods And then we just have to do that for the external container and Container struct.
That way there is no need to duplicate the GenerateFilterFunc... funxtions
Hello, |
Hello, I absolutely agree with you! However, that improvement might be implemented in separate PR due to its complexity as it affects not only main code but tests as well, I'm ready to support/work on it. It is more wise in this PR accept changes which affect filtering feature only. |
39bf186
to
5f37325
Compare
Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> add a test, improve logic of command filter Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> improve a test Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> improve test, update a man page Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> improve man page, runtime functions Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> move ExternalContainerFilter type to entities package Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> add external filters Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> add tests for external containers Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> add test for ps external id, ancestor Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> add tests for ps external filters of since, before Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> fix linter warnings, add completion for the name filter Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> resolve conflicts Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> check command length, filter containers liist by external key Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>
5f37325
to
e4f1289
Compare
This PR is intended to implement feature requested in issue #24664
I decided to implement filtering of commands to all kind of containers: for external and for managed by
podman
, I guess, this approach is better than just implementing this feature for a single sort of container.If you don't want to accept this approach then I will put it away and implement filtering for external container only.
Does this PR introduce a user-facing change?