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

Improve the (skopeo delete) man page #1597

Merged
merged 1 commit into from
Apr 14, 2022
Merged

Conversation

mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Mar 18, 2022

… per containers/image#1010 , at least as a short-term stopgap. Compare that issue, and #1432, for much more about possible code improvements.

  • Actually add a DESCRIPTION heading.
  • Warn about deleting by digest — it affects an unknown set of tags.
  • Warn about deleting by tag — it currently works by the resolved digest.

## DESCRIPTION

Mark _image-name_ for deletion.
The effect of this is registry-specific; many registries don’t this operation, or don’t allow it in some circumstances / configurations.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The effect of this is registry-specific; many registries don’t this operation, or don’t allow it in some circumstances / configurations.
The effect of this is registry-specific; many registries don’t support this operation, or don’t allow it in some circumstances / configurations.

Mark _image-name_ for deletion.
The effect of this is registry-specific; many registries don’t this operation, or don’t allow it in some circumstances / configurations.

**WARNING**: If _image-name_ contains a digest, this affects the referenced manifest, and may delete all tags (within the current repository?) pointing to that manifest.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
**WARNING**: If _image-name_ contains a digest, this affects the referenced manifest, and may delete all tags (within the current repository?) pointing to that manifest.
**WARNING**: If _image-name_ contains a digest, this affects the referenced manifest, and may delete all tags pointing to that manifest.

I am quite confused by that. In case it's important, could you rephrase?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

After pushing the same image (same digest) to

  • repo1:tag1A
  • repo1:tag1B
  • repo2:tag2A
  • repo2:tag2B

the distribution/distribution implementation of deleting repo1@digest is to untag repo1:tag1A and repo1:tag1B, but not repo2:tag2A and repo2:tag2B.

The specification does not describe any of this in detail.


Should the text say something like “all tags within the relevant repository that point to the manifest in question” without the parentheses and the question mark? That’s probably the most reasonable behavior, I just don’t have any data about what various registries do.


**WARNING**: If _image-name_ contains a digest, this affects the referenced manifest, and may delete all tags (within the current repository?) pointing to that manifest.

**WARNING**: If _image-name_ contains a tag (but not a digest), currently this resolves the tag into a digest, and then deletes the manifest by digest, as described above (possibly deleting all tags pointing to that manifest, not just the provided tag.) This behavior may change in the future.

Choose a reason for hiding this comment

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

Suggested change
**WARNING**: If _image-name_ contains a tag (but not a digest), currently this resolves the tag into a digest, and then deletes the manifest by digest, as described above (possibly deleting all tags pointing to that manifest, not just the provided tag.) This behavior may change in the future.
**WARNING**: If _image-name_ contains a tag (but not a digest), currently this resolves the tag into a digest, and then deletes the manifest by digest, as described above (possibly deleting all tags pointing to that manifest, not just the provided tag). This behavior may change in the future.


**WARNING**: If _image-name_ contains a digest, this affects the referenced manifest, and may delete all tags (within the current repository?) pointing to that manifest.

**WARNING**: If _image-name_ contains a tag (but not a digest), currently this resolves the tag into a digest, and then deletes the manifest by digest, as described above (possibly deleting all tags pointing to that manifest, not just the provided tag.) This behavior may change in the future.
Copy link
Member

Choose a reason for hiding this comment

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

Minor tweak for consideration

Suggested change
**WARNING**: If _image-name_ contains a tag (but not a digest), currently this resolves the tag into a digest, and then deletes the manifest by digest, as described above (possibly deleting all tags pointing to that manifest, not just the provided tag.) This behavior may change in the future.
**WARNING**: If _image-name_ contains a tag (but not a digest), this resolves the tag into a digest and then deletes the manifest by digest, as described above (possibly deleting all tags pointing to that manifest, not just the provided tag). This behavior may change in the future.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The intent of “currently” was to give us an opportunity to change this problematic design. I have replaced that with “in the current version of Skopeo”, is that clearer?

Actually add a DESCRIPTION heading.

Warn about deleting by digest - it affects an unknown set of tags.

Warn about deleting by tag - it currently works by the resolved digest.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Apr 14, 2022

LGTM

@rhatdan rhatdan merged commit 145304b into containers:main Apr 14, 2022
@mtrmac mtrmac deleted the delete-warning branch April 14, 2022 14:02
@mtrmac mtrmac mentioned this pull request Jul 12, 2022
6 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants