Mirror writes to database: Manifests DELETE Handler
Context
This issue is meant to investigate steps which are required to mirror metadata writes generated from calls the Manifests PUT Handler.
Affected Route(s)
DELETE /v2/<name>/manifests/<reference>
Detailed Handler Operations.
- Instantiate a distribution.ManifestService, the concrete type is a
storage.manifestStore
- Call
distribution.ManifestService.Delete(ctx,
digest.Digest) using the digest from the
manifestHandler`- Call
storage.manifestStore.blobStore.Delete(ctx, digest.Digest)
, concrete type isstoreage.linkedBlobStore
- Return error if deletion is not supported
- call
storeage.linkedBlobStore.blobAccessController.Clear(ctx, digest.Digest)
, concrete type is (probably)storage.linkedBlobStatter
- range over
storeage.linkedBlobStatter.linkPathFns
there aremanifestRevisionLinkPath
(<root>/v2/repositories/<name>/_manifests/revisions/<algorithm>/<hex digest>/link
) andblobLinkPath
(<root>/v2/repositories/<name>/_layers/<algorithm>/<hex digest>/link
) ref- call
driver.StorageDriver.Delete
on both paths, ignoringdriver.PathNotFoundError
- call
- range over
- Call
- Instantiate a distribution.TagService, the concrete type is a
storage.tagStore
- call
distribution.TagService.Lookup(ctx, distribution.Descriptor{Digest: imh.Digest})
to getreferencedTags
- range over tag in
referencedTags
- call
distribution.TagService.Untag(ctx, tag)
- get the
manifestTagPathSpec
for the tag (<root>/v2/repositories/<name>/_manifests/tags/<tag>/
) - call
driver.StorageDriver.Delete(ctx, manifestTagPathSpec)
- append any errors into
manifestHandler.Errors
- get the
- call
- call
http.ResponseWriter.WriteHeader(http.StatusAccepted)
Edited by Hayley Swimelar