marcosmamorim opened a new issue, #35661:
URL: https://github.com/apache/superset/issues/35661

   ### 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:**
   1. Configure Slack integration with `SLACK_API_TOKEN`
   2. Enable `ALERT_REPORTS` feature flag
   3. Create an Alert/Report with Slack notification
   4. Try to select a channel from the dropdown
   5. 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:
   ```python
   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](https://github.com/apache/superset/pull/35622)
   
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] 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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to