Skip to content

Support HTTP debug in ctr#5234

Merged
dmcgowan merged 1 commit intocontainerd:masterfrom
mxpv:http-dbg
Mar 24, 2021
Merged

Support HTTP debug in ctr#5234
dmcgowan merged 1 commit intocontainerd:masterfrom
mxpv:http-dbg

Conversation

@mxpv
Copy link
Copy Markdown
Member

@mxpv mxpv commented Mar 19, 2021

This PR adds:

Signed-off-by: Maksym Pavlenko [email protected]

@mxpv mxpv requested a review from estesp March 19, 2021 22:11
@mxpv
Copy link
Copy Markdown
Member Author

mxpv commented Mar 19, 2021

Changes should not affect linux integration tests

@mxpv
Copy link
Copy Markdown
Member Author

mxpv commented Mar 19, 2021

/ok-to-test

Comment thread remotes/docker/config/hosts.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than accepting a transportWrapper, I think it might be more flexible for the resolver to accept a function that mutates an http.Client as an option. You could then pass the generated default http.Client to that function to get modified however the caller wishes.

type HTTPClientOptionFunc func(*http.Client) error
client := &http.Client{
	Transport: defaultTransport
}
if options.HTTPClientOption != nil {
	if err := options.HTTPClientOption(client); err != nil {
		return nil, err
	}
}

@estesp
Copy link
Copy Markdown
Member

estesp commented Mar 20, 2021

Sorry for the CI noise; #5235 will fix the failures in integration runs

Signed-off-by: Maksym Pavlenko <[email protected]>
@mxpv
Copy link
Copy Markdown
Member Author

mxpv commented Mar 22, 2021

Updated and rebased.

Copy link
Copy Markdown
Member

@crosbymichael crosbymichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmcgowan dmcgowan merged commit 31a0f92 into containerd:master Mar 24, 2021
@estesp
Copy link
Copy Markdown
Member

estesp commented Mar 24, 2021

Thanks for this improvement @mxpv!

@mxpv mxpv deleted the http-dbg branch March 24, 2021 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants