Skip to content

Commit

Permalink
Merge pull request #3031 from kebe7jun/fix/optimize-task-fetch
Browse files Browse the repository at this point in the history
Do not obtain task info when it is not necessary in commit command
  • Loading branch information
AkihiroSuda committed May 24, 2024
2 parents 88cb67b + 11fcb6b commit a7dde33
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/imgutil/commit/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ func Commit(ctx context.Context, client *containerd.Client, container containerd
return emptyDigest, err
}

task, err := container.Task(ctx, cio.Load)
if err != nil {
return emptyDigest, err
}

if opts.Pause {
task, err := container.Task(ctx, cio.Load)
if err != nil {
return emptyDigest, err
}

status, err := task.Status(ctx)
if err != nil {
return emptyDigest, err
Expand Down

0 comments on commit a7dde33

Please sign in to comment.