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 podman manifest rm --ignore #24678

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

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Nov 25, 2024

When removing manifests, users should be allowed to ignore ones that no longer exists.

Does this PR introduce a user-facing change?

podman manifest rm --ignore option added to ignore missing manifests.

Copy link
Contributor

openshift-ci bot commented Nov 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

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

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

Choose a reason for hiding this comment

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

thank you!

@baude
Copy link
Member

baude commented Nov 25, 2024

the api change looks ok to me. @Luap99 @mheon ptal

@baude
Copy link
Member

baude commented Nov 25, 2024

Can you add/enhance a test in test/apiv2/15-manifest.at @rhatdan ?

@@ -9,6 +9,12 @@ podman\-manifest\-rm - Remove manifest list or image index from local storage
## DESCRIPTION
Copy link
Member

Choose a reason for hiding this comment

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

Should we be committing this if there is a corresponding .in file?

Copy link
Member

Choose a reason for hiding this comment

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

yes if we use .in the normal file should not be committed and added to the gitignore
Technically speaking there is no reason to use the .in file as it doesn't make use of the imports

"github.com/containers/podman/v5/pkg/errorhandling"
"github.com/spf13/cobra"
)

var (
rmCmd = &cobra.Command{
rmOptions = entities.ImageRemoveOptions{}
rmCmd = &cobra.Command{
Use: "rm LIST [LIST...]",
Copy link
Member

Choose a reason for hiding this comment

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

need to add [options] between rm and LIST

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch.

@@ -9,6 +9,12 @@ podman\-manifest\-rm - Remove manifest list or image index from local storage
## DESCRIPTION
Copy link
Member

Choose a reason for hiding this comment

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

yes if we use .in the normal file should not be committed and added to the gitignore
Technically speaking there is no reason to use the .in file as it doesn't make use of the imports

podman\-manifest\-rm - Remove manifest list or image index from local storage

## SYNOPSIS
**podman manifest rm** *list-or-index* [...]
Copy link
Member

Choose a reason for hiding this comment

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

Also must add [*options*] here

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice. the .in file should not have been checked in.

When removing manifests, users should be allowed to ignore
ones that no longer exists.

Signed-off-by: Daniel J Walsh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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 release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants