-
Notifications
You must be signed in to change notification settings - Fork 18.9k
containerd integration: image pull #44756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
96c03ec to
af4507f
Compare
b4cf150 to
8ee91f3
Compare
corhere
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The big picture looks good, but some more work is needed in the details.
| func (f httpFallback) RoundTrip(r *http.Request) (*http.Response, error) { | ||
| resp, err := f.super.RoundTrip(r) | ||
| if err != nil { | ||
| if strings.Contains(err.Error(), "http: server gave HTTP response to HTTPS client") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lame, but there's no alternative. The standard library returns an errors.New error for this case. Anyone wanna write a Go language proposal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave that one to you :)
8ee91f3 to
86028fd
Compare
daemon/containerd/progress.go
Outdated
|
|
||
| type updateProgressFunc func(ctx context.Context, ongoing *jobs, output progress.Output, start time.Time) error | ||
|
|
||
| func showProgress(ctx context.Context, ongoing *jobs, out progress.Output, updateFunc updateProgressFunc) func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since jobs is only useful in conjunction with showProgress and vice versa, I feel that association should be formalized.
| func showProgress(ctx context.Context, ongoing *jobs, out progress.Output, updateFunc updateProgressFunc) func() { | |
| func (j *jobs) showProgress(ctx context.Context, out progress.Output, updateFunc updateProgressFunc) func() { |
86028fd to
30af35f
Compare
|
CI failures look unrelated |
corhere
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, aside from one thing I missed in my earlier reviews. My bad.
Signed-off-by: Nicolas De Loof <[email protected]> Signed-off-by: Sebastiaan van Stijn <[email protected]> containerd: Push progress Signed-off-by: Paweł Gronowski <[email protected]>
We pass WithPullUnpack anyway Signed-off-by: Paweł Gronowski <[email protected]>
Signed-off-by: Paweł Gronowski <[email protected]> Signed-off-by: Nicolas De Loof <[email protected]>
Signed-off-by: Paweł Gronowski <[email protected]>
30af35f to
9032e67
Compare
|
Going to bring this one in as it has reached acceptance. |
- What I did
Upstreaming:
c8d/pull: Add options for stargz/nydus snapshotters rumpl/moby#42Implements
docker pullwith containerd.Also includes stargz and nydus snapshotter handling, these two are lazy ones and need additional handlers during pull(pre-emptively removing this from the changeset to avoid too much comments, will add this one later)Limiting concurrent downloads is not yet implemented, see here for the discussion, the way containerd handles limits is different than what moby does, I think we can implement limiting in a followup
Note: I will squash the commits once it's reviewed, it's easier to review with different commits