Fix parallel push of the same image to different registries
| ... | ... |
@@ -137,6 +137,7 @@ func (p *v2Pusher) pushV2Tag(ctx context.Context, ref reference.NamedTagged, ima |
| 137 | 137 |
descriptorTemplate := v2PushDescriptor{
|
| 138 | 138 |
v2MetadataService: p.v2MetadataService, |
| 139 | 139 |
repoInfo: p.repoInfo, |
| 140 |
+ ref: p.ref, |
|
| 140 | 141 |
repo: p.repo, |
| 141 | 142 |
pushState: &p.pushState, |
| 142 | 143 |
} |
| ... | ... |
@@ -222,13 +223,14 @@ type v2PushDescriptor struct {
|
| 222 | 222 |
layer layer.Layer |
| 223 | 223 |
v2MetadataService *metadata.V2MetadataService |
| 224 | 224 |
repoInfo reference.Named |
| 225 |
+ ref reference.Named |
|
| 225 | 226 |
repo distribution.Repository |
| 226 | 227 |
pushState *pushState |
| 227 | 228 |
remoteDescriptor distribution.Descriptor |
| 228 | 229 |
} |
| 229 | 230 |
|
| 230 | 231 |
func (pd *v2PushDescriptor) Key() string {
|
| 231 |
- return "v2push:" + pd.repo.Named().Name() + " " + pd.layer.DiffID().String() |
|
| 232 |
+ return "v2push:" + pd.ref.FullName() + " " + pd.layer.DiffID().String() |
|
| 232 | 233 |
} |
| 233 | 234 |
|
| 234 | 235 |
func (pd *v2PushDescriptor) ID() string {
|