dcernag opened a new issue, #31309: URL: https://github.com/apache/superset/issues/31309
### Bug description When creating or editing a report, superset call is consistently rate-limited by slack when connected to a slack organization with a high number of channels. Steps to reproduce 1. Enable `ALERT_REPORT_SLACK_V2` feature flag 2. Go to Alerts and Reports 3. Create or edit an existing alert/report and select slack as notification method Expected behavior: Dropdown with list of channels is shown and request is retried if rate-limited Actual behavior: No dropdown and only one try to get slack channels and exception is shown I quickly glanced get_channels_with_search and don't immediately see rate-limit handling with retries when error reasong coming from slack is `ratelimited`. If implemented, it would be amazing to also retry for slack exception reasons: `request_timeout`, `service_unavailable`, and `internal_error` ### Screenshots/recordings _No response_ ### Superset version master / latest-dev ### Python version 3.10 ### Node version I don't know ### Browser Chrome ### Additional context Stack trace: ``` 2024-12-05 17:39:03,252:ERROR:superset.reports.api:Error fetching slack channels Failed to list channels: The request to the Slack API failed. (url: https://slack.com/api/conversations.list) The server responded with: {'ok': False, 'error': 'ratelimited'} [05/Dec/2024:17:39:03 +0000] "GET /api/v1/report/slack_channels/?q=(exactMatch:!f,searchString:%27%27,types:!(public_channel,private_channel)) HTTP/1.1" 422 190 "https://superset.example.com/report/list/?pageIndex=0&sortColumn=name&sortOrder=desc" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" ``` ``` FEATURE_FLAGS = { "ALERT_REPORT_TABS": True, "ALERT_REPORTS": True, "CHART_PLUGINS_EXPERIMENTAL": True, "DASHBOARD_CROSS_FILTERS": True, "DASHBOARD_RBAC": True, "DRILL_TO_DETAIL": True, "DRILL_BY": True, "ENABLE_TEMPLATE_PROCESSING": True, "ESTIMATE_QUERY_COST": True, "EMBEDDED_SUPERSET": True, "HORIZONTAL_FILTER_BAR": True, "ALERT_REPORT_SLACK_V2": True, "TAGGING_SYSTEM": True, "THUMBNAILS": True, "THUMBNAILS_SQLA_LISTENERS": True } ``` ### 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]
