Skip to content

perf: optimize request count for manifest and blob deletion#1116

Merged
qweeah merged 1 commit into
mainfrom
optimize-delete
Sep 12, 2023
Merged

perf: optimize request count for manifest and blob deletion#1116
qweeah merged 1 commit into
mainfrom
optimize-delete

Conversation

@qweeah

@qweeah qweeah commented Sep 12, 2023

Copy link
Copy Markdown
Contributor

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>
@codecov-commenter

codecov-commenter commented Sep 12, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1116 (01a3230) into main (6609ecb) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is n/a.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@           Coverage Diff           @@
##             main    #1116   +/-   ##
=======================================
  Coverage   80.40%   80.40%           
=======================================
  Files          57       57           
  Lines        2945     2945           
=======================================
  Hits         2368     2368           
  Misses        398      398           
  Partials      179      179           

@shizhMSFT shizhMSFT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@shizhMSFT

Copy link
Copy Markdown
Contributor

@qweeah qweeah merged commit 788b4fb into main Sep 12, 2023
@shizhMSFT shizhMSFT deleted the optimize-delete branch September 22, 2023 14:29
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