dosubot[bot] commented on issue #32480: URL: https://github.com/apache/superset/issues/32480#issuecomment-2693267377
<!-- Greeting --> Hey there, @Usiel! I'm here to assist you with any bugs, questions, or contributions you have for Superset. Let's tackle this issue together! <!-- Answer --> To address the rate-limiting issue when retrieving Slack channels in large workspaces, you can consider the following approaches: 1. **Implement Rate-Limit Handling**: As you've already done, adding a `RateLimitErrorRetryHandler` to the Slack client is a good start. This will help manage rate-limit errors by retrying requests a limited number of times. You can adjust the `max_retry_count` to balance between retry attempts and user experience. 2. **Asynchronous Retrieval with Caching**: Implementing a Celery task to fetch Slack channels asynchronously and cache the results can significantly improve performance. This way, when a user accesses the alert configuration, the application can quickly retrieve the cached list of channels without hitting the Slack API repeatedly. Ensure that the cache is updated periodically to reflect any changes in the Slack workspace. 3. **User Input for Channel Selection**: Allow users to manually enter a channel name or ID, which can then be validated and mapped to the correct channel asynchronously. This approach reduces the need to fetch all channels upfront and can be particularly useful in large workspaces. 4. **Optimize API Calls**: Consider optimizing the API calls by reducing the number of requests. For example, you can fetch only active channels or limit the number of channels retrieved per request to avoid hitting the rate limit quickly. These strategies can help mitigate the rate-limiting issue and improve the user experience when configuring Slack notifications in Superset. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/fef6039c-0ccd-40ee-a9a7-639ead345f01?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/fef6039c-0ccd-40ee-a9a7-639ead345f01?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/fef6039c-0ccd-40ee-a9a7-639ead345f01?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/fef6039c-0ccd-40ee-a9a7-639ead345f01?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/fef6039c-0ccd-40ee-a9a7-639ead345f01?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/fef6039c-0ccd-40ee-a9a7-639ead345f01?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/fef6039c-0ccd-40ee-a9a7-639ead345f01?feedback_type=other)</sup> -- 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]
