From ea12df791e1c712326bb43283c6fd06d0be85416 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Sun, 26 Sep 2021 23:13:37 +0200 Subject: [PATCH] Enable HTTP 2 again We are re-enabling HTTP 2 again. There has been a few bugfixes upstream in go, and we have also enabled ReadIdleTimeout. Signed-off-by: Julien Pivotto --- go.mod | 2 +- go.sum | 2 ++ notify/opsgenie/opsgenie.go | 2 +- notify/pagerduty/pagerduty.go | 2 +- notify/pushover/pushover.go | 2 +- notify/slack/slack.go | 2 +- notify/sns/sns.go | 2 +- notify/victorops/victorops.go | 2 +- notify/webhook/webhook.go | 2 +- notify/wechat/wechat.go | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 2f9d87db32..68da321430 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/oklog/ulid v1.3.1 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.11.0 - github.com/prometheus/common v0.30.0 + github.com/prometheus/common v0.31.0 github.com/prometheus/common/sigv4 v0.1.0 github.com/prometheus/exporter-toolkit v0.6.1 github.com/rs/cors v1.8.0 diff --git a/go.sum b/go.sum index 60f4a77ee4..02d9379c38 100644 --- a/go.sum +++ b/go.sum @@ -420,6 +420,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.31.0 h1:FTJdLTjtrh4dXlCjpzdZJXMnejSTL5F/nVQm5sNwD34= +github.com/prometheus/common v0.31.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/exporter-toolkit v0.6.1 h1:Aqk75wQD92N9CqmTlZwjKwq6272nOGrWIbc8Z7+xQO0= diff --git a/notify/opsgenie/opsgenie.go b/notify/opsgenie/opsgenie.go index 4a64ed6581..7ce85e7299 100644 --- a/notify/opsgenie/opsgenie.go +++ b/notify/opsgenie/opsgenie.go @@ -44,7 +44,7 @@ type Notifier struct { // New returns a new OpsGenie notifier. func New(c *config.OpsGenieConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "opsgenie", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "opsgenie", append(httpOpts)...) if err != nil { return nil, err } diff --git a/notify/pagerduty/pagerduty.go b/notify/pagerduty/pagerduty.go index 3e90db7c60..5e146a731b 100644 --- a/notify/pagerduty/pagerduty.go +++ b/notify/pagerduty/pagerduty.go @@ -49,7 +49,7 @@ type Notifier struct { // New returns a new PagerDuty notifier. func New(c *config.PagerdutyConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pagerduty", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pagerduty", append(httpOpts)...) if err != nil { return nil, err } diff --git a/notify/pushover/pushover.go b/notify/pushover/pushover.go index 5dd555d7d7..52412cd2e0 100644 --- a/notify/pushover/pushover.go +++ b/notify/pushover/pushover.go @@ -43,7 +43,7 @@ type Notifier struct { // New returns a new Pushover notifier. func New(c *config.PushoverConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pushover", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pushover", append(httpOpts)...) if err != nil { return nil, err } diff --git a/notify/slack/slack.go b/notify/slack/slack.go index b297caea98..14ea155d75 100644 --- a/notify/slack/slack.go +++ b/notify/slack/slack.go @@ -43,7 +43,7 @@ type Notifier struct { // New returns a new Slack notification handler. func New(c *config.SlackConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "slack", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "slack", append(httpOpts)...) if err != nil { return nil, err } diff --git a/notify/sns/sns.go b/notify/sns/sns.go index c947b1b6fa..f69e20467d 100644 --- a/notify/sns/sns.go +++ b/notify/sns/sns.go @@ -48,7 +48,7 @@ type Notifier struct { // New returns a new SNS notification handler. func New(c *config.SNSConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "sns", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "sns", append(httpOpts)...) if err != nil { return nil, err } diff --git a/notify/victorops/victorops.go b/notify/victorops/victorops.go index 8b83546fdc..6960a215ee 100644 --- a/notify/victorops/victorops.go +++ b/notify/victorops/victorops.go @@ -42,7 +42,7 @@ type Notifier struct { // New returns a new VictorOps notifier. func New(c *config.VictorOpsConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "victorops", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "victorops", append(httpOpts)...) if err != nil { return nil, err } diff --git a/notify/webhook/webhook.go b/notify/webhook/webhook.go index 1f11a7b3ec..fe85afd9f3 100644 --- a/notify/webhook/webhook.go +++ b/notify/webhook/webhook.go @@ -45,7 +45,7 @@ type Notifier struct { // New returns a new Webhook. func New(conf *config.WebhookConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*conf.HTTPConfig, "webhook", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*conf.HTTPConfig, "webhook", append(httpOpts)...) if err != nil { return nil, err } diff --git a/notify/wechat/wechat.go b/notify/wechat/wechat.go index 573e3ae940..b98c740df2 100644 --- a/notify/wechat/wechat.go +++ b/notify/wechat/wechat.go @@ -72,7 +72,7 @@ type weChatResponse struct { // New returns a new Wechat notifier. func New(c *config.WechatConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "wechat", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "wechat", append(httpOpts)...) if err != nil { return nil, err }