Skip to content
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

Remove the golang.org/x/net/http2 dependency #548

Open
na-- opened this issue Mar 20, 2018 · 2 comments
Open

Remove the golang.org/x/net/http2 dependency #548

na-- opened this issue Mar 20, 2018 · 2 comments
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 refactor

Comments

@na--
Copy link
Member

na-- commented Mar 20, 2018

We use golang.org/x/net/http2 only for the ConfigureTransport() function. It is needed because when we use a non-nil TLSClientConfig in http.Transport, we break Go's automatic HTTP2 support and need ConfigureTransport() to fix it. Since we don't support old Go versions and since that's the only thing from golang.org/x/net/http2 we use, we may as well copy it into k6 and drop the dependency.

@na-- na-- added evaluation needed proposal needs to be validated or tested before fully implementing it in k6 high prio labels Nov 20, 2020
@na-- na-- added this to the v0.30.0 milestone Nov 20, 2020
@na--
Copy link
Member Author

na-- commented Nov 20, 2020

Turns out this is more important than I realized! When using the http.ConfigureTransport() from golang.org/x/net/http2, it makes k6 use whatever version of that dependency we've configured in go.mod, and we'd forgotten to update that dependency for quite a while... 😞

So we don't have to do something like #1734 on every k6 release and Go version bump, we probably should figure out some way to depend only on the standard Go library, if that's at all possible...

@mstoykov
Copy link
Collaborator

We won't actually be able to drop it as it is also used by gRPC directly (for other reasons it seems). But maybe still, a good idea if we can make use of some black/unsafe magic to use the stdlib one instead.

@na-- na-- modified the milestones: v0.30.0, v1.0.0 Jan 13, 2021
@na-- na-- removed the high prio label Oct 18, 2021
@na-- na-- removed this from the v1.0.0 milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 refactor
3 participants