Skip to content

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Sep 7, 2023

What this PR does / why we need it:
This PR optimize the request count of oras blob delete and oras manifest delete when using against a remote registry.

When deleting a manifest via tag from registry, the requests are optimized as below:

Before
request #0: HEAD manifest tag- 401
request #1: GET token (scope: pull) - 200
request #2: HEAD manifest tag- 200
request #3: GET manifest digest- 200
request #4: DELETE manifest digest 401
request #5: GET token (scope: delete, pull) - 200
request #6: DELETE manifest digest - 202

After
request #0: HEAD manifest tag- 401
request #1: GET token (scope: pull, delete, push) - 200
request #2: HEAD manifest tag- 200
request #3: GET manifest digest- 200
request #4: DELETE manifest digest - 202

Same for oras blob delete.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1104

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@qweeah qweeah marked this pull request as ready for review September 11, 2023 08:03
@qweeah qweeah changed the title perf: optmize request count for manifest and blob deletion perf: optimize request count for manifest and blob deletion Sep 11, 2023
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@Wwwsylvia Wwwsylvia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I'm not a maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize the number of auth requests for oras manifest delete and oras blob delete
3 participants