-
Notifications
You must be signed in to change notification settings - Fork 61
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
failed to execute http request #170
Comments
What kind of terraform provider configuration do you have set? |
Hi, please find below my terraform provider configuration.
Regards |
Hi, please find below a snippet of the
Found this Issue hashicorp/terraform-plugin-go#285, but not sure if it is related to mine? Regards |
I don't see how that issue is related. What stands out to me is that your debug logs shows sonarqube api responding with a (status: 502). So it seems like the provider is able to reach out to your sonarqube instance but is getting a 502 back instead of the proper response. Is there anything in sonarqube logs when these failures happen? |
Thanks, I'll check the SonarQube Logs and will get back to you. |
I wasn't able to find anything so far in the SonarQube Logs. The Log Level is currently set to "INFO". I requested to get the Log Level set to "DEBUG" and then check again. In the meantime here is the SonarQube Version: |
in my testing, against the same server i've been able to turn the 502 into a 401 (i don't have access to the api token) by bumping go-retryablehttp to v0.7.4, which was released about an hour ago, containing hashicorp/go-retryablehttp#194. based on the description this is supposed to only affect PUT/POST, but i've been able to reproduce the 502 responses to GET requests from the server with go outside of this provider using go-retryablehttp v0.7.2/v0.7.3 and no longer with v0.7.4.
$ git diff --patch-with-stat
go.mod | 2 +-
go.sum | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/go.mod b/go.mod
index 60f5897..0095234 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.18
require (
github.com/hashicorp/go-cleanhttp v0.5.2
- github.com/hashicorp/go-retryablehttp v0.7.2
+ github.com/hashicorp/go-retryablehttp v0.7.4
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1
github.com/satori/uuid v1.2.0
diff --git a/go.sum b/go.sum
index d240ad9..a0f55e0 100644
--- a/go.sum
+++ b/go.sum
@@ -74,6 +74,8 @@ github.com/hashicorp/go-plugin v1.4.8 h1:CHGwpxYDOttQOY7HOWgETU9dyVjOXzniXDqJcYJ
github.com/hashicorp/go-plugin v1.4.8/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s=
github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0=
github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
+github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA=
+github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= |
@Nothing4You odd issue and thanks for your investigative work. Did you want to open a pr to bump that dependency? I'm good with updating it as long as CI tests pass. |
Dependabot has done it for us #175 I'll cut a new release right now. Let me know if that works |
Hi, I can confirm that the Issue has been fixed with terraform sonarqube provider version 1.16.2. Thank you @Nothing4You for your investigation and Thanks to @jdamata for your help. I guess this Issue can be closed. Regards |
Hi there,
Getting below Error
Error: failed to execute http request
, but when I run a curl command (curl -u ${sonarqube_token}: https://<sonarqube-fqdn>/api/system/info
) from the same Machine it works.Terraform Version
Terraform v1.4.5
Terraform SonarQube Provider Version: 0.16.1
Affected Resource(s)
all resources (group, project, permissions)
Actual Behavior
What actually happened?
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan
Thanks in advance.
The text was updated successfully, but these errors were encountered: