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
Datasource: Fix dataproxy timeout should always be applied for outgoing data source HTTP requests #34597
Datasource: Fix dataproxy timeout should always be applied for outgoing data source HTTP requests #34597
Conversation
go.mod
Outdated
@@ -51,7 +51,7 @@ require ( | |||
github.com/gosimple/slug v1.9.0 | |||
github.com/grafana/grafana-aws-sdk v0.4.0 | |||
github.com/grafana/grafana-live-sdk v0.0.6 | |||
github.com/grafana/grafana-plugin-sdk-go v0.99.0 | |||
github.com/grafana/grafana-plugin-sdk-go v0.99.1-0.20210524132954-f5c0098028e0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can create a tag here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please go ahead tag a new version - v0.100.0 🎉 and update this accordingly. Instructions here
ResponseHeaderTimeout
- split from DialContext
t…ResponseHeaderTimeout
default timeout in http client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but left some suggestions/request of changes.
go.mod
Outdated
@@ -51,7 +51,7 @@ require ( | |||
github.com/gosimple/slug v1.9.0 | |||
github.com/grafana/grafana-aws-sdk v0.4.0 | |||
github.com/grafana/grafana-live-sdk v0.0.6 | |||
github.com/grafana/grafana-plugin-sdk-go v0.99.0 | |||
github.com/grafana/grafana-plugin-sdk-go v0.99.1-0.20210524132954-f5c0098028e0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please go ahead tag a new version - v0.100.0 🎉 and update this accordingly. Instructions here
Should we reference closing this issue as well in the PR description 29457? |
…out-and-dialer-context-timeout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍 but need to tag a new version of the sdk and update go.mod - see comment for instructions
@marefr, yep, just waiting for people to test it so we won't need to tag again! |
@marefr Should also be added to changelog and be backported once verified that it works, yes? |
Yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… http client (#34629) * HTTP Client: Make `ResponseHeaderTimeout` default timeout in http client (#34597) * HTTP Client: Add `ResponseHeaderTimeout` - split from `DialContext` timeout * Fixes according to reviewer's comments * Use grafana-plugin-sdk-go v0.100.0 (cherry picked from commit 91657da) * Small change Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com> Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
ResponseHeaderTimeout
default timeout in http client
What this PR does / why we need it:
ResponseHeaderTimeout
is now set for the http.Transport via grafana/grafana-plugin-sdk-go#358 which should guarantee that outgoing data source HTTP requests that do not directly use ahttp.Client
, rather ahttp.Transport
, will get theResponseHeaderTimeout
set to the configured dataproxy timeout. The Grafana data source proxy and the Prometheus data source (when queries comes from Grafana alerting) are two examples where the dataproxy timeout was not properly enforced, but this change should fix this.In addition, a new data proxy setting named
dialTimeout
was introduced.Which issue(s) this PR fixes:
Fixes #34177
Fixes #29457