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

Add all, external, and label to Image.prune() #413

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

inknos
Copy link
Contributor

@inknos inknos commented Aug 1, 2024

Param all is now supported by prune.
Param external is now supported by prune.
Filter by label, which was already supported, is now documented and tested.

Resolves: #312

Copy link
Contributor

openshift-ci bot commented Aug 1, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: inknos
Once this PR has been reviewed and has the lgtm label, please assign vrothberg for approval. For more information see the Kubernetes Code Review Process.

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

Copy link

We were not able to find or create Copr project packit/containers-podman-py-413 specified in the config with the following error:

Packit received HTTP 500 Internal Server Error from Copr Service. Check the Copr status page: https://copr.fedorainfracloud.org/status/stats/, or ask for help in Fedora Build System matrix channel https://matrix.to/#/#buildsys:fedoraproject.org.

Unless the HTTP status code above is >= 500, please check your configuration for:

  1. typos in owner and project name (groups need to be prefixed with @)
  2. whether the project name doesn't contain not allowed characters (only letters, digits, underscores, dashes and dots must be used)
  3. whether the project itself exists (Packit creates projects only in its own namespace)
  4. whether Packit is allowed to build in your Copr project
  5. whether your Copr project/group is not private

@inknos
Copy link
Contributor Author

inknos commented Aug 1, 2024

/packit build

@rhatdan
Copy link
Member

rhatdan commented Aug 1, 2024

LGTM
@umohnani8 @jwhonce @mwhahaha PTAL

@inknos
Copy link
Contributor Author

inknos commented Aug 1, 2024

Quoting @jwhonce from the issue

Adding external and all as kwargs would require extra validation if the client has been instantiated in compatible_version mode

I scratched my head on this comment, but I think it's just a simple check that I am missing. Maybe you could help me out with what do you mean with this :)

@inknos
Copy link
Contributor Author

inknos commented Aug 1, 2024

Also, apologies for several force pushes, looks like I can't get pylint locally and in GH work nicely together, so it keeps complaining 🤦🏻‍♂️

Param all is now supported by prune.
Param external is now supported by prune.
Filter by label, which was already supported, is now
documented and tested.

Resolves: containers#312

Signed-off-by: Nicola Sella <[email protected]>
@jwhonce
Copy link
Member

jwhonce commented Aug 1, 2024

Quoting @jwhonce from the issue

Adding external and all as kwargs would require extra validation if the client has been instantiated in compatible_version mode

I scratched my head on this comment, but I think it's just a simple check that I am missing. Maybe you could help me out with what do you mean with this :)

@inknos It is possible to configure the PodmanClient to only use the compatible API for a Podman service or talk to a Docker service. I was questioning how would we handle providing these additional parameters to the call since they are not supported in that case. Should podman-py report an error? Or, should it just make the call and allow the API service to either ignore them or report an error?

@inknos
Copy link
Contributor Author

inknos commented Aug 2, 2024

Should podman-py report an error? Or, should it just make the call and allow the API service to either ignore them or report an error?

As long as podman-py does not crash or give a traceback I like to see the api errors, more than translating what's happening. Maybe I would wrap the calls with a warning in the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImagesManager.prune() - no support for query-params/kwargs?
3 participants