Skip to content
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

pull: add cache for gcr bug #1024

Merged
merged 1 commit into from
Jun 17, 2019
Merged

Conversation

tonistiigi
Copy link
Member

fix #720

Signed-off-by: Tonis Tiigi tonistiigi@gmail.com

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
ref = r.repo(ref) + "-" + session.FromContext(ctx)

cr, ok := r.m[ref]
cr.timeout = time.Now().Add(time.Minute)
Copy link
Member

Choose a reason for hiding this comment

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

Why 1 minute?

Copy link
Member Author

Choose a reason for hiding this comment

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

Same as in moby. This should be enough to avoid the second request in most cases. Ideally, this could be connected to the /session dropping.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

var cache *resolverCache

func init() {
cache = newResolverCache()
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit, but no need for init(), can be var cache = newResolverCache()

@tiborvass tiborvass merged commit 914d867 into moby:master Jun 17, 2019
@thaJeztah
Copy link
Member

Is this in the vendored code in Moby? If so we might want to backport to the 18.09 branch

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.

buildkit + gcr.io private repos (credHelpers) do not stack
4 participants