-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
resolver: add better pooling and custom authenticator #1636
Conversation
Signed-off-by: Tonis Tiigi <[email protected]>
eedd88e
to
4111533
Compare
hmm. some |
e9fa571
to
ccb68e6
Compare
green now |
@@ -71,7 +71,7 @@ require ( | |||
) | |||
|
|||
replace ( | |||
github.com/containerd/containerd => github.com/containerd/containerd v1.4.0-beta.2.0.20200728183644-eb6354a11860 | |||
github.com/containerd/containerd => github.com/containerd/containerd v1.4.0-beta.2.0.20200730150746-fa1220fce33f |
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.
Can we just vendor rc.1 ?
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.
No objections for vendoring newer containerd. Was just trying to keep changes in this PR minimal and specific to the auth feature.
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
ccb68e6
to
e650092
Compare
@sipsma Thanks. Updated |
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
@tonistiigi I've got the same issue with GitHub Container Registry. Switching to |
Changes all remote resolvers access through the new pooling functions.
Resolvers should now be always reused for concurrent access. Repeated access reuse tokens if they are still valid and if they have permissions to access them. Token expiring does not cause the build to fail anymore. The fallback order of request methods has been changed to avoid an extra request.
Some copy-paste in here can be removed when someone merges containerd/containerd#4445
In a follow-up I want to extend this to move token requests to the client. Could also add some authentication prediction for common registries but that probably will not be that significant atm.
@sipsma Added
WithSession
method to update existing resolver but didn't change anything about managing remotes yet. We can discuss these follow up changes after this is merged.