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

ccl/storageccl: support HTTP_PROXY env vars #34067

Merged
merged 1 commit into from
Feb 4, 2019
Merged

ccl/storageccl: support HTTP_PROXY env vars #34067

merged 1 commit into from
Feb 4, 2019

Conversation

maddyblue
Copy link
Contributor

HTTP and S3 storage both used a wrapped http.Client, but it didn't copy
and modify http.DefaultTransport, instead making one from scratch. This
meant that the normally supported settings like proxy and timeouts
were zero'd.

Fixes #32803

Release note (enterprise change): Support standard HTTP proxy environment
variables in HTTP and S3 storage.

@maddyblue maddyblue requested review from dt and a team January 16, 2019 21:22
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@dt dt left a comment

Choose a reason for hiding this comment

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

I guess this is annoying to test and presumably the underlying stdlib tests cover it, so it'd really just be a "do the flags work" test.

@dt
Copy link
Member

dt commented Jan 22, 2019

We have existing users complaining about the lack of proxy support -- do we want to consider this for a backport? It is fixing a user-visible defect (and $ users at that) and is pretty tightly contained change. I think it is low-risk too?

@maddyblue
Copy link
Contributor Author

Roland reported that the proxy settings were already working for S3, although I'm not sure how. I think it makes sense to make a full test to ensure we don't regress and to figure out if it already worked, and if so, why. I'll rework this PR with a test.

@maddyblue
Copy link
Contributor Author

Added a pretty annoying test. I verified that it fails without the accompanying change. This leads me to believe that the S3 client has its own proxy stuff which is why the customer reported it working, but the test needed the change to pass since the tests uses HTTP. I do think this warrants a backport in either case.

@knz
Copy link
Contributor

knz commented Feb 4, 2019

I like this change. Thank you for making it! Is there still a chance to merge this and backport?

@maddyblue
Copy link
Contributor Author

Yes. @dt can you review the test?

@maddyblue
Copy link
Contributor Author

Although this is kind of annoying because the httpproxy package would have to be vendored just for this test. Not sure if it's worth it.

@dt
Copy link
Member

dt commented Feb 4, 2019

still lgtm -- I'm fine with or without the test. I'd say vendoring the lib isn't unreasonable, though doing it again for the backport seems like it's really getting into diminishing returns.

HTTP and S3 storage both used a wrapped http.Client, but it didn't copy
and modify http.DefaultTransport, instead making one from scratch. This
meant that the normally supported settings like proxy and timeouts
were zero'd.

Fixes #32803

Release note (enterprise change): Support standard HTTP proxy environment
variables in HTTP and S3 storage.
@maddyblue
Copy link
Contributor Author

bors r+

@maddyblue
Copy link
Contributor Author

Thanks. I cut the test. But I was glad to write it to verify things worked as expected.

craig bot pushed a commit that referenced this pull request Feb 4, 2019
34067: ccl/storageccl: support HTTP_PROXY env vars r=mjibson a=mjibson

HTTP and S3 storage both used a wrapped http.Client, but it didn't copy
and modify http.DefaultTransport, instead making one from scratch. This
meant that the normally supported settings like proxy and timeouts
were zero'd.

Fixes #32803

Release note (enterprise change): Support standard HTTP proxy environment
variables in HTTP and S3 storage.

Co-authored-by: Matt Jibson <[email protected]>
@craig
Copy link
Contributor

craig bot commented Feb 4, 2019

Build succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants