remotes: support cross-repo-push#3218
Conversation
1a89d37 to
e35d261
Compare
remotes/docker/authorizer.go
Outdated
Codecov Report
@@ Coverage Diff @@
## master #3218 +/- ##
=========================================
- Coverage 44.85% 44.75% -0.1%
=========================================
Files 113 113
Lines 12361 12513 +152
=========================================
+ Hits 5544 5600 +56
- Misses 5964 6057 +93
- Partials 853 856 +3
Continue to review full report at Codecov.
|
remotes/docker/authorizer.go
Outdated
There was a problem hiding this comment.
Ah, oops, I missed the mis-spell; note that I didn't do a real review, I just noticed this PR and spotted the var/const, and now the typo; I'm not super-familiar with this area of the code, so you might want to wait for "real" reviewers to do their review 😅
| const defaultExpiredIn = 60 | |
| const defaultExpiresIn = 60 |
|
this is an alternative to #3053, right? |
84b7778 to
6d8eb5c
Compare
|
because of the wall, I failed to vendor the package. will update it soon.... |
|
ping @dmcgowan PTAL. Thanks |
462bd81 to
57c7022
Compare
|
ping @dmcgowan I have updated it and use lock and waitgroup to handle auth fetch job: authHandler will support to lock by the resource scope and limit one fetch job per resource scope. PTAL. Thanks |
remotes/docker/scope.go
Outdated
There was a problem hiding this comment.
if l != idx? A check seems cheaper than assignment considering the common case is l == idx
There was a problem hiding this comment.
check the objdump and the if uses less instruction 😂
if there has one duplicate item, there always goes with if and assignment. So, I think it is ok here.
remotes/docker/authorizer.go
Outdated
There was a problem hiding this comment.
How does a new scope get added in? For example if I first requested for read the token options only has a pull scope, but now I add a response which push scope, do the token options get updated?
There was a problem hiding this comment.
Basically, for one registry host, both the realm and service are the same. The common option will maintain the original resource scope, for instance, repository:foo/bar:pull. If the following request wants to use different scope, like repository:foo/bar:push, the request handler should put the scope into the context and the auth handler will retrieve it and combine with original scope. I think we don't need to update the common options here.
|
Build succeeded.
|
With distribution source label in content store, select the longest common prefix components as condidate mount blob source and try to push with mount blob. Fix containerd#2964 Signed-off-by: Wei Fu <fuweid89@gmail.com>
|
Build succeeded.
|
With distribution source label in content store, select the longest
common prefix components as condidate mount blob source and try to push
with mount blob.
Fix #2964
Signed-off-by: Wei Fu fuweid89@gmail.com