fix: fix load image failed#4888
Conversation
8aadf5d to
680f950
Compare
75b7499 to
ad11fa6
Compare
|
after many tests I find TestLoadStdinFromPipe still failed sometimes because of the tag size( it should be containerd bug? ) and another err log is (with shot tag see ningmingxiao#14 ci logs) |
40c9f0d to
703400e
Compare
Isn't the tag length deterministic? |
|
now tag length will not generate error now but find anoter error after many times test |
65de54a to
dc3acf6
Compare
| return progressFn, done | ||
| } | ||
|
|
||
| func ProgressHandlerLoadImage(ctx context.Context, client *containerd.Client, beforeSet map[string]bool, options types.ImageLoadOptions) (transfer.ProgressFunc, func(), *[]images.Image) { |
There was a problem hiding this comment.
When client.Transfer finishes, it triggers cancel(), immediately killing the ProgressHandlerLoadImage goroutine. Any delayed saved events will still be dropped?
|
|
||
| var loadedImages []images.Image | ||
| pf, done := transferutil.ProgressHandler(ctx, options.Stdout) | ||
| storeOpts = append(storeOpts, transferimage.WithNamedPrefix(fmt.Sprintf("import-%s", time.Now().Format("2006-01-02")), true)) |
There was a problem hiding this comment.
It fixes the dash-to-space bug, but untagged archives will now print internal names to users?
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
fix test TestLoadStdinFromPipe failed
reproduce
add some sleep at https://github.com/containerd/nerdctl/blob/v2.3.0/pkg/imgutil/load/load.go#L93
nothing will out put
@ChengyuZhu6 it's introduce by commit c40fda5
another reason containerd/containerd#13097
so we can't use identifier := data.Identifier() now until containerd fix it.