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

HttpGetter: Avoid reusing the same http.Request #315

Merged
merged 4 commits into from
Mar 31, 2021

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Mar 31, 2021

This fixes a race condition as demonstrated by the attached test.

go-cleanhttp is bumped to 0.5.2 as that brings this patch hashicorp/go-cleanhttp@6d9e2ac which in combination with the implementation introduces the race condition.

See also golang/go#45311

This will effectively unblock hashicorp/terraform-ls#448 once terraform-exec upgrades go-getter to a version with this patch.

@radeksimko radeksimko force-pushed the fix-req-race-condition branch 2 times, most recently from 466cd11 to fa86e8e Compare March 31, 2021 08:53
@radeksimko radeksimko force-pushed the fix-req-race-condition branch from fa86e8e to 3cca945 Compare March 31, 2021 08:59
@radeksimko radeksimko marked this pull request as ready for review March 31, 2021 09:22
Copy link
Contributor

@azr azr left a comment

Choose a reason for hiding this comment

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

Nice one, LGTM

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.

2 participants