conformance: don't require http 202 for already-deleted manifest blob #478
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my registry implementation a
DELETE /v2/<name>/manifests/<reference>
request deletes the manifest blob.
In the conformance tests the
DELETE /v2/<name>/manifests/<reference>
callsare followed by
DELETE /v2/<name>/blobs/<digest>
where<digest>
refers tothe digest of the manifest referred to by
<reference>
.I understand why the tests are written this way - most registries seem to be
implemented in a way that it's not necessarily safe to automatically delete a
blob just because the last thing to reference it was also deleted, but my
implementation is based on storing relational metadata in an ACID-compliant DB
in such a way that bulk data is the only thing stored in the backing object
store (which for data race protection reasons isn't even keyed by content
digest but randomly-assigned UUID). Because of this design choice, it is safe
to at least attempt deleting blobs themselves when the manifest is deleted.
So because it is possible to safely delete the manifest blob during the
DELETE /v2/<name>/manifests/<reference>
calls, the subsequent attempt to explicitlydelete the blob in the test case should allow a 404 response.