-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: save auth requests for push and attach #1097
Conversation
Signed-off-by: Sylvia Lei <lixlei@microsoft.com>
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more. @@ Coverage Diff @@
## main #1097 +/- ##
==========================================
+ Coverage 79.99% 80.08% +0.08%
==========================================
Files 56 57 +1
Lines 2914 2927 +13
==========================================
+ Hits 2331 2344 +13
Misses 405 405
Partials 178 178
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but this change can also be applied to manifest delete and blob delete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Follow up? |
Created #1104. @Wwwsylvia Do we still need to create the issue for copying? |
Created #1105. |
What this PR does / why we need it:
Add
pull, push
scope hints before callingCopy
fororas push
andoras attach
.This can potentially save 2 requests for each command.
oras push
Before
request
#0
: HEAD manifest digest - 401request
#1
: POST token (scope: pull) - 200request
#2
: HEAD manifest digest - 404request
#3
: HEAD config ({}) - 404request
#4
: POST config ({}) - 401request
#5
: POST token (scope: pull, push) - 200request
#6
: POST config ({}) - 202request
#7
: PUT config ({}) - 201request
#8
: PUT manifest tag - 201After
request
#0
: HEAD manifest digest - 401request
#1
: POST token (scope: pull) - 200request
#2
: HEAD manifest digest - 404request
#3
: HEAD config ({}) - 404request
#4
: POST config ({}) - 202request
#5
: PUT config ({}) - 201request
#6
: PUT manifest tag - 201oras attach
Before
request
#0
: HEAD subject tag - 401request
#1
: POST token (scope: pull) - 200request
#2
: HEAD subject tag - 200request
#3
: HEAD manifest digest - 404request
#4
: HEAD config ({}) - 200request
#5
: HEAD layer - 404request
#6
: POST layer - 401request
#7
: POST token (scope: pull, push) - 200request
#8
: POST layer - 202request
#9
: PUT layer - 201request
#10
: PUT manifest tag - 201After
request
#0
: HEAD subject tag - 401request
#1
: POST token (scope: pull) - 200request
#2
: HEAD subject tag - 200request
#3
: HEAD manifest digest - 404request
#4
: HEAD config ({}) - 200request
#5
: HEAD layer - 404request
#6
: POST layer - 202request
#7
: PUT layer - 201request
#8
: PUT manifest tag - 201Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #1084
Please check the following list: