dosubot[bot] commented on issue #36129: URL: https://github.com/apache/superset/issues/36129#issuecomment-3540097471
<!-- Greeting --> Hi @slice-swayams! I'm [Dosu](https://go.dosu.dev/dosubot) and Iām helping the superset team. <!-- Answer --> Superset already includes a migration path from Slack's deprecated files_upload API to files_upload_v2 for report publishing. The SlackNotification class uses files_upload, but if the v2 API is available (determined by the ALERT_REPORT_SLACK_V2 feature flag and Slack scopes), it raises an exception to trigger an upgrade to files_upload_v2. The report execution logic catches this, updates the recipient to use the v2 API, converts channel names to IDs, and retries the notification with files_upload_v2. If the migration fails (for example, if a channel can't be found), the code reverts to the legacy type and logs an error for manual correction. This migration is handled at runtime, so you don't need to manually add a try/except for files_upload_v2 in the notification code itself. For best results, ensure the ALERT_REPORT_SLACK_V2 feature flag is enabled and your Slack app has the required scopes, especially channels:read, to support the v2 API and avoid deprecation issues in future S uperset releases. [Reference: Slack notification migration logic](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/report/execute.py#L130-L626) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/23e4e764-e4e3-4184-a5a8-75abb5c1302b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/23e4e764-e4e3-4184-a5a8-75abb5c1302b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/23e4e764-e4e3-4184-a5a8-75abb5c1302b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/23e4e764-e4e3-4184-a5a8-75abb5c1302b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/23e4e764-e4e3-4184-a5a8-75abb5c1302b?feedback_type=hallucination) | [Report š](https://app.dosu.dev/response-feedback/23e4e764-e4e3-4184-a5a8-75abb5c1302b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/23e4e764-e4e3-4184-a5a8-75abb5c1302b?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36129) -- 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]
