(ctx context.Context, index *v1.Index, request *tasks.CheckpointTaskRequest)
| 728 | } |
| 729 | |
| 730 | func (t *task) checkpointTask(ctx context.Context, index *v1.Index, request *tasks.CheckpointTaskRequest) error { |
| 731 | response, err := t.client.TaskService().Checkpoint(ctx, request) |
| 732 | if err != nil { |
| 733 | return errgrpc.ToNative(err) |
| 734 | } |
| 735 | // NOTE: response.Descriptors can be an empty slice if checkpoint image is jumped |
| 736 | // add the checkpoint descriptors to the index |
| 737 | for _, d := range response.Descriptors { |
| 738 | index.Manifests = append(index.Manifests, v1.Descriptor{ |
| 739 | MediaType: d.MediaType, |
| 740 | Size: d.Size, |
| 741 | Digest: digest.Digest(d.Digest), |
| 742 | Platform: &v1.Platform{ |
| 743 | OS: goruntime.GOOS, |
| 744 | Architecture: goruntime.GOARCH, |
| 745 | }, |
| 746 | Annotations: d.Annotations, |
| 747 | }) |
| 748 | } |
| 749 | return nil |
| 750 | } |
| 751 | |
| 752 | func (t *task) checkpointRWSnapshot(ctx context.Context, index *v1.Index, snapshotterName string, id string) error { |
| 753 | opts := []diff.Opt{ |
no test coverage detected