-
Notifications
You must be signed in to change notification settings - Fork 16k
Open
Labels
alert-reportsNamespace | Anything related to the Alert & Reports featureNamespace | Anything related to the Alert & Reports feature
Description
Bug description
When fetching Slack channels for Alerts & Reports, the code uses a hardcoded max_retry_count=2
in the RateLimitErrorRetryHandler
. This causes failures when Slack API returns HTTP 429 (rate limit):
POST https://slack.com/api/conversations.list - HTTP Error 429: Too Many Requests
Reproduction steps:
- Configure Slack integration with
SLACK_API_TOKEN
- Enable
ALERT_REPORTS
feature flag - Create an Alert/Report with Slack notification
- Try to select a channel from the dropdown
- Error occurs after 2 retry attempts
Expected behavior:
Retry count should be configurable to handle rate limits in different workspace sizes.
Root cause:
superset/utils/slack.py
line 54:
rate_limit_handler = RateLimitErrorRetryHandler(max_retry_count=2) # Hardcoded
Screenshots/recordings
N/A
Superset version
master / latest-dev
Python version
3.11
Node version
16
Browser
Chrome
Additional context
- More noticeable in large workspaces (10k+ channels) due to higher number of paginated requests
- Feature flag enabled:
ALERT_REPORTS
- Fix available in PR #35622
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Metadata
Metadata
Assignees
Labels
alert-reportsNamespace | Anything related to the Alert & Reports featureNamespace | Anything related to the Alert & Reports feature