Skip to content

Revert "slack: retry 429 errors (#2112)"#2128

Merged
simonpasquier merged 1 commit intoprometheus:release-0.20from
simonpasquier:revert-pr-2112
Dec 6, 2019
Merged

Revert "slack: retry 429 errors (#2112)"#2128
simonpasquier merged 1 commit intoprometheus:release-0.20from
simonpasquier:revert-pr-2112

Conversation

@simonpasquier
Copy link
Member

This reverts commit 26cc96a.

As discussed in #2121, when an API endpoint applies rate-limits, retrying immediately might cause more harm than waiting a bit.

From the Slack documentation:

Continuing to send messages after exceeding a rate limit runs the risk of your app being permanently disabled.

For now, I think that retrying the notification on the next group_interval as it was before is the safest option.

cc @roidelapluie @gavk34 @stuartnelson3 @mxinden

This reverts commit 26cc96a.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier simonpasquier merged commit 052707f into prometheus:release-0.20 Dec 6, 2019
@simonpasquier simonpasquier deleted the revert-pr-2112 branch December 6, 2019 09:17
simonpasquier added a commit that referenced this pull request Dec 12, 2019
* Revert "slack: retry 429 errors (#2112)" (#2128)

This reverts commit 26cc96a.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Revert "config: remove support for JSON marshaling (#2086)" (#2133)

This reverts commit 918f08b.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* config: fix JSON unmarshaling for HostPort (#2134)

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Cut 0.20.0 (#2137)

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
biwwy0 added a commit to biwwy0/alertmanager that referenced this pull request Feb 26, 2026
Make HTTP 429 (Too Many Requests) retryable for the Slack notifier by
adding http.StatusTooManyRequests to the retrier's RetryCodes, matching
the pattern already used by PagerDuty, OpsGenie, Jira, and incident.io.

Additionally, parse the Retry-After response header on 429 responses and
sleep for the indicated duration before returning. This addresses the
concern raised when a similar change was reverted in prometheus#2128: simply
retrying 429 without honoring Retry-After causes rapid-fire retries that
risk getting apps permanently disabled by Slack. The sleep respects
context cancellation.

Fixes prometheus#2111
Ref prometheus#2205

Signed-off-by: Anton Ivanov <antonivanov@bitgo.com>
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