From ea0878dc000a5a510b0ee690cfe7f69e9e517b79 Mon Sep 17 00:00:00 2001 From: "Lixia (Sylvia) Lei" Date: Fri, 20 Oct 2023 15:29:53 +0800 Subject: [PATCH] perf: reduce auth request count for manifest delete Signed-off-by: Lixia (Sylvia) Lei --- registry/remote/repository.go | 1 + 1 file changed, 1 insertion(+) diff --git a/registry/remote/repository.go b/registry/remote/repository.go index fc4f6bf6..769f614d 100644 --- a/registry/remote/repository.go +++ b/registry/remote/repository.go @@ -1121,6 +1121,7 @@ func (s *manifestStore) deleteWithIndexing(ctx context.Context, target ocispec.D if err := limitSize(target, s.repo.MaxMetadataBytes); err != nil { return err } + ctx = registryutil.WithScopeHint(ctx, s.repo.Reference, auth.ActionPull, auth.ActionDelete) manifestJSON, err := content.FetchAll(ctx, s, target) if err != nil { return err