Copy annotations around where necessary
Make sure that the newly added annotations are copied around appropriately. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
c6703d4c76
commit
0b711d616a
@ -74,6 +74,7 @@ func WithCheckpointTask(ctx context.Context, client *Client, c *containers.Conta
|
||||
Size: d.Size_,
|
||||
Digest: d.Digest,
|
||||
Platform: &platformSpec,
|
||||
Annotations: d.Annotations,
|
||||
})
|
||||
}
|
||||
// save copts
|
||||
|
2
diff.go
2
diff.go
@ -83,6 +83,7 @@ func toDescriptor(d *types.Descriptor) ocispec.Descriptor {
|
||||
MediaType: d.MediaType,
|
||||
Digest: d.Digest,
|
||||
Size: d.Size_,
|
||||
Annotations: d.Annotations,
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,6 +92,7 @@ func fromDescriptor(d ocispec.Descriptor) *types.Descriptor {
|
||||
MediaType: d.MediaType,
|
||||
Digest: d.Digest,
|
||||
Size_: d.Size,
|
||||
Annotations: d.Annotations,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,6 +140,7 @@ func descFromProto(desc *types.Descriptor) ocispec.Descriptor {
|
||||
MediaType: desc.MediaType,
|
||||
Size: desc.Size_,
|
||||
Digest: desc.Digest,
|
||||
Annotations: desc.Annotations,
|
||||
}
|
||||
}
|
||||
|
||||
@ -148,5 +149,6 @@ func descToProto(desc *ocispec.Descriptor) types.Descriptor {
|
||||
MediaType: desc.MediaType,
|
||||
Size_: desc.Size,
|
||||
Digest: desc.Digest,
|
||||
Annotations: desc.Annotations,
|
||||
}
|
||||
}
|
||||
|
@ -167,6 +167,7 @@ func toDescriptor(d *types.Descriptor) ocispec.Descriptor {
|
||||
MediaType: d.MediaType,
|
||||
Digest: d.Digest,
|
||||
Size: d.Size_,
|
||||
Annotations: d.Annotations,
|
||||
}
|
||||
}
|
||||
|
||||
@ -175,5 +176,6 @@ func fromDescriptor(d ocispec.Descriptor) *types.Descriptor {
|
||||
MediaType: d.MediaType,
|
||||
Digest: d.Digest,
|
||||
Size_: d.Size,
|
||||
Annotations: d.Annotations,
|
||||
}
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ func descFromProto(desc *types.Descriptor) ocispec.Descriptor {
|
||||
MediaType: desc.MediaType,
|
||||
Size: desc.Size_,
|
||||
Digest: desc.Digest,
|
||||
Annotations: desc.Annotations,
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,5 +67,6 @@ func descToProto(desc *ocispec.Descriptor) types.Descriptor {
|
||||
MediaType: desc.MediaType,
|
||||
Size_: desc.Size,
|
||||
Digest: desc.Digest,
|
||||
Annotations: desc.Annotations,
|
||||
}
|
||||
}
|
||||
|
@ -146,6 +146,7 @@ func (l *local) Create(ctx context.Context, r *api.CreateTaskRequest, _ ...grpc.
|
||||
MediaType: r.Checkpoint.MediaType,
|
||||
Digest: r.Checkpoint.Digest,
|
||||
Size: r.Checkpoint.Size_,
|
||||
Annotations: r.Checkpoint.Annotations,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -627,6 +628,7 @@ func (l *local) writeContent(ctx context.Context, mediaType, ref string, r io.Re
|
||||
MediaType: mediaType,
|
||||
Digest: writer.Digest(),
|
||||
Size_: size,
|
||||
Annotations: make(map[string]string),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
1
task.go
1
task.go
@ -567,6 +567,7 @@ func (t *task) checkpointTask(ctx context.Context, index *v1.Index, request *tas
|
||||
OS: goruntime.GOOS,
|
||||
Architecture: goruntime.GOARCH,
|
||||
},
|
||||
Annotations: d.Annotations,
|
||||
})
|
||||
}
|
||||
return nil
|
||||
|
@ -67,6 +67,7 @@ func WithTaskCheckpoint(im Image) NewTaskOpts {
|
||||
MediaType: m.MediaType,
|
||||
Size_: m.Size,
|
||||
Digest: m.Digest,
|
||||
Annotations: m.Annotations,
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user