podman
podman copied to clipboard
Allow filtering containers by command
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?
None
the change LGTM, but you'll need to update the man pages too
the change LGTM, but you'll need to update the man pages too
Thank you! All related man pages have been updated, however I have the following issue on the validation stage:
hack/xref-helpmsgs-manpages xref-helpmsgs-manpages: 'podman container list --format <TAB>' lists '.Commands', which is not in docs/source/markdown/podman-ps.1.md xref-helpmsgs-manpages: 'podman container ps --format <TAB>' lists '.Commands', which is not in docs/source/markdown/podman-ps.1.md xref-helpmsgs-manpages: 'podman ps --format <TAB>' lists '.Commands', which is not in docs/source/markdown/podman-ps.1.md make[1]: *** [Makefile:608: xref-helpmsgs-manpages] Error 1
Could you please me an advice how to fix it?
All objections were removed, all applicable filters were applied for external containers with corresponding tests.
Looks like you did not update man pages correctly.
Looks like you did not update man pages correctly.
Hello, I'll work on it once back from vacation.
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,
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.
Hello colleagues, Any decision regarding this PR?
@arsenalzp I don't have time to tackle this right now, I am not strictly opposed to how you have done it so if others are ok with then it is fine for me to. We just need to make sure it doesn't break anything.
Build is complaining you need to update the manpages
Build is complaining you need to update the manpages
Hello, Thank you for help. I tried, it seems it finished successfully.
$make --debug=b docs
...
Must remake target 'docs/source/markdown/podmansh.1'.
Successfully remade target file 'docs/source/markdown/podmansh.1'.
Must remake target 'docs'.
Successfully remade target file 'docs'.
$
However, there are many warnings:
troff:<standard input>:255: warning [p 4, 5.5i]: cannot adjust line
troff:<standard input>:272: warning [p 4, 8.3i]: cannot adjust line
troff:<standard input>:346: warning [p 5, 9.0i]: cannot adjust line
troff:<standard input>:359: warning [p 5, 11.2i]: cannot adjust line
troff:<standard input>:372: warning [p 6, 2.0i]: cannot adjust line
troff:<standard input>:389: warning [p 6, 4.7i]: cannot adjust line
troff:<standard input>:463: warning [p 7, 5.5i]: cannot adjust line
troff:<standard input>:474: warning [p 7, 7.5i]: cannot adjust line
troff:<standard input>:485: warning [p 7, 9.5i]: cannot adjust line
troff:<standard input>:496: warning [p 8, 0.2i]: cannot adjust line
troff:<standard input>:361: warning [p 4, 11.0i, div '3tbd44,1', 0.0i]: cannot adjust line
Hello colleagues, Do you have any updates on this PR?
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.
Ephemeral COPR build failed. @containers/packit-build please check.
Two checks failed due to version mismatch:
go: go.mod requires go >= 1.23.0 (running go 1.22.12; GOTOOLCHAIN=local) error: Bad exit status from /var/tmp/rpm-tmp.QlFQho (%build)
Hello colleagues, Do you have any objections/comments?
@arsenalzp Mind rebasing on top of latest main to fix CI?
Seems OK in initial review, I'll do a final one after rebase
@Luap99 PTAL when you get a chance
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: arsenalzp, Luap99
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [Luap99]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment