Skip to content

Commit

Permalink
perf: reduce auth request count for manifest delete (#623)
Browse files Browse the repository at this point in the history
Backporting 0f1dc30 to the release
branch.
This change does the same thing as the original commit (#618) did but
using the old `registryutil.WithScopeHint` instead of
`auth.AppendRepositoryScope`, which is introduced by #604 and is not
available in `v2.3.x`.

Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
  • Loading branch information
Wwwsylvia authored Oct 20, 2023
1 parent f175957 commit f296072
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 @@ -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
Expand Down

0 comments on commit f296072

Please sign in to comment.