Skip to content

Commit

Permalink
perf: reduce auth request count for manifest delete (#618)
Browse files Browse the repository at this point in the history
Add `pull` and `delete` scope hints before attempting client-side indexing on manifest delete.

Resolve: #594 
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
  • Loading branch information
Wwwsylvia authored Oct 18, 2023
1 parent 459a246 commit 0f1dc30
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions registry/remote/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,7 @@ func (s *manifestStore) deleteWithIndexing(ctx context.Context, target ocispec.D
if err := limitSize(target, s.repo.MaxMetadataBytes); err != nil {
return err
}
ctx = auth.AppendRepositoryScope(ctx, s.repo.Reference, auth.ActionPull, auth.ActionDelete)
manifestJSON, err := content.FetchAll(ctx, s, target)
if err != nil {
return err
Expand Down

0 comments on commit 0f1dc30

Please sign in to comment.