-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add --ignore option to podman artifact rm command #27154
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
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rhatdan 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 |
This PR was also generated with Cursor, this time by just telling it to fix the #27084 issue. |
This commit implements the --ignore functionality for the artifact rm command, allowing users to ignore errors when specified artifacts do not exist. Changes made: - Add Ignore field to ArtifactRemoveOptions entity types - Add --ignore CLI flag (-i short form) to artifact rm command - Implement ignore logic in ABI backend to continue processing on errors - Update API handlers and tunnel implementation for podman-remote support - Add comprehensive documentation and examples to man page - Add e2e and system BATS tests for --ignore functionality - Clean up whitespace in BATS test files The --ignore option follows the same pattern as other podman ignore options like 'podman image rm --ignore' and 'podman pod rm --ignore'. It allows scripts to continue execution when trying to remove artifacts that may not exist, preventing race conditions in cleanup scenarios. Usage examples: podman artifact rm --ignore nonexistent-artifact podman artifact rm --ignore existing-artifact nonexistent-artifact Fixes: containers#27084 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
|
||
Print usage statement. | ||
|
||
#### **--ignore**, **-i** |
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.
Should use @@option ignore
here
You were beaten by #27142 |
|
||
Ignore errors when removing non-existent artifacts. | ||
``` | ||
$ podman artifact rm --ignore nonexistent-artifact existing-artifact |
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 would prefer the use of fully qualified artifact names here.
The beaten part was fine, I was really experimenting with Cursor here. And in my opinion it worked pretty well. Closing. |
This commit implements the --ignore functionality for the artifact rm command, allowing users to ignore errors when specified artifacts do not exist.
Changes made:
The --ignore option follows the same pattern as other podman ignore options like 'podman image rm --ignore' and 'podman pod rm --ignore'. It allows scripts to continue execution when trying to remove artifacts that may not exist, preventing race conditions in cleanup scenarios.
Usage examples:
podman artifact rm --ignore nonexistent-artifact
podman artifact rm --ignore existing-artifact nonexistent-artifact
Fixes: #27084
Does this PR introduce a user-facing change?