Comments (6)
I'm not a distribution spec maintainer, but for what it's worth, "b" is the behavior of the original/reference implementation (which IMO is the behavior most supported by the existing spec wording as well).
from distribution-spec.
a) Deleting by tag deletes the underlying manifest and might thus also delete other tags referencing the same manifest.
I hope there aren't any registries out there that delete other tags.
b) Deleting a tag deletes the tag itself, not the underlying manifest. Note that implementations might garbage-collect manifestes without any tags.
This is close to my understanding of most registries. But saying "not the underlying manifest" implies that all registries would preserve the manifest, and I would not be surprised if some exist that immediately delete manifests as soon as the last tag is removed. That wouldn't be a full GC (you still need grace time to push a multi-platform collection of manifests), but a simple ref-count that destroys content as soon as the count goes from 1 to 0.
c) Whether deleting by tag also deletes the underlying manifest is up to the implementation.
It would be unexpected to me if an implementation destroyed the underlying manifest while other tags still reference it.
GC and content retention policies continue to be an implementation detail. Some registries retain content indefinitely, others are designed to be ephemeral destroying even tagged content after a short time, and organizations impose legal requirements on this to either preserve or ensure content is destroyed according to their company policies.
Looking over the spec, I think the clarification should be "what is a tag". We currently have the definition:
Tag: a custom, human-readable manifest identifier
I think it would be helpful to clarify that a tag is a pointer to a manifest and a manifest is stored by digest. Then the tag delete API would indicate that it is explicitly deleting the tag. While the manifest delete API is deleting both the manifest and any tags pointing to that manifest.
This intentionally avoids the question of whether implementations may or should delete the underlying manifest because I think it depends on both the scenario (particularly whether there other tags pointing to the manifest) and the implementation.
from distribution-spec.
Looking over the spec, I think the clarification should be "what is a tag". We currently have the definition:
Tag: a custom, human-readable manifest identifier
Hmm, I think that this is good enough for a definition. The clarification is really needed in the Deleting tags
section. What contributes to the ambiguity is that the same endpoint used for deleting manifests and tags:
DELETE /v2/<name>/manifests/<tag> # The action in question
DELETE /v2/<name>/manifests/<digest> # Deletes an actual manifest
⬆️
Both say "manifests"
from distribution-spec.
The clarification is really needed in the
Deleting tags
section.
My suggestion included a recommended change to that section.
from distribution-spec.
Related Issues (20)
- Add digest/etag header to referrers response
- Update language on client side referrer list generation to mention replace HOT 2
- Add `PUT` method support for `/referrers` endpoint HOT 2
- Proposal: Extend Referrer API to image layer blob HOT 1
- Question regarding refferres API conformance tests for push HOT 1
- Debug mode cannot be turned off for conformance test HOT 1
- Conformance teardown test deleteManifestBeforeBlobs should allow return 400 when delete by tag is disallowed by registry HOT 1
- [conformance] Allow 404 on tag list for management test
- Define sane limits on the repository name HOT 3
- [![](https://github.com/<org>/<repo>/workflows/oci-distribution-conformance/badge.svg)](https://github.com/<org>/<repo>/actions?query=workflow%3Aoci-distribution-conformance)
- Idea: GoLang specs for V2 new media types like `application/vnd.docker.distribution.manifest.v2+json` HOT 3
- Proposal: Limit the maximum number of lists returned by the tags list API HOT 2
- performance: what can dist-spec do to improve downloads of large images/layers? HOT 7
- Teardown Tests Should Accept 404 Response for Blob Deletion HOT 2
- Proposal: Allow listing tags in reverse lexical order HOT 1
- performance: consider relaxing chunks should be in order for patched uploads HOT 9
- Proposal: refactor conformance tests HOT 9
- proposal: tighten digest verification requirements for clients HOT 4
- Can we assume all manifests and indexes are always pushed using the /manifests API in case of multiarch images? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from distribution-spec.