sadpandajoe opened a new pull request, #42089: URL: https://github.com/apache/superset/pull/42089
### SUMMARY Fixes [SC-113467](https://app.shortcut.com/preset/story/113467/slack-v1-auto-upgrade-breaks-private-channel-text-reports-without-groups-read). Slack v1 text reports to private channels could stop delivering when the automatic Slack v2 upgrade probe succeeded but channel discovery could not find private channels because the token lacked `groups:read`. This change: - falls back to the existing Slack v1 text-delivery path when the Slack v2 recipient migration cannot be persisted; - preserves multi-channel delivery during that fallback; - keeps the notification configuration unchanged when migration is unavailable; - fails Slack v1 file reports with an actionable message listing the required Slack v2 scopes. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Not applicable — backend report-delivery behavior only. ### TESTING INSTRUCTIONS Automated verification: ```bash pytest tests/unit_tests/commands/report/execute_test.py \ tests/unit_tests/reports/notifications/slack_tests.py \ tests/unit_tests/utils/slack_test.py pre-commit run --all-files ``` Results: - 142 unit tests passed. - All repository pre-commit hooks passed, including mypy, pylint, frontend type-checking, frontend/docs linting, Helm docs, and zizmor. Manual Slack validation: 1. Configure a Slack v1 text report for one or more private channels using a bot token with `channels:read` but without `groups:read`. 2. Enable `ALERT_REPORT_SLACK_V2` and run the report. 3. Verify the text report is delivered to every configured private channel and the notification remains configured as Slack v1. 4. Configure the same report with a file attachment and verify the failure message asks for `channels:read` and `groups:read`. A live Slack workspace/token was not available for this local verification. Selected report integration tests were also blocked by a local metadata schema missing `ssh_tunnels.server_host_key`; the focused unit coverage exercises the complete fallback and migration paths. ### ADDITIONAL INFORMATION - [x] Has associated issue: [SC-113467](https://app.shortcut.com/preset/story/113467/slack-v1-auto-upgrade-breaks-private-channel-text-reports-without-groups-read) - [x] Required feature flags: `ALERT_REPORT_SLACK_V2` - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/19863)) - [ ] Adds new REST routes - [ ] Deprecates feature or API - [ ] Removes feature or API -- 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]
