Merge pull request #23712 from aaronlehmann/parallel-push-multiple-registries

Fix parallel push of the same image to different registries
This commit is contained in:
Vincent Demeester 2016-06-22 00:40:35 +02:00 committed by GitHub
commit 3e0f96cdb3

View file

@ -137,6 +137,7 @@ func (p *v2Pusher) pushV2Tag(ctx context.Context, ref reference.NamedTagged, ima
descriptorTemplate := v2PushDescriptor{
v2MetadataService: p.v2MetadataService,
repoInfo: p.repoInfo,
ref: p.ref,
repo: p.repo,
pushState: &p.pushState,
}
@ -222,13 +223,14 @@ type v2PushDescriptor struct {
layer layer.Layer
v2MetadataService *metadata.V2MetadataService
repoInfo reference.Named
ref reference.Named
repo distribution.Repository
pushState *pushState
remoteDescriptor distribution.Descriptor
}
func (pd *v2PushDescriptor) Key() string {
return "v2push:" + pd.repo.Named().Name() + " " + pd.layer.DiffID().String()
return "v2push:" + pd.ref.FullName() + " " + pd.layer.DiffID().String()
}
func (pd *v2PushDescriptor) ID() string {