KristiDodaj opened a new pull request, #45508:
URL: https://github.com/apache/superset/pull/45508

   ### SUMMARY
   
   Add Microsoft Teams as an optional notification destination for 
attachment-free alerts.
   
   Administrators configure a single tenant, bot credentials, and approved 
standard channels. Users select a destination in the alert editor. Each 
notification creates a new channel post containing the alert name, optional 
description, and optional link to Superset.
   
   The integration is disabled by default behind `ALERT_REPORT_TEAMS` and uses 
the optional `teams` dependency extra. Authenticated installation callbacks 
maintain routing information. Removing the bot disables delivery until it is 
reinstalled.
   
   Includes recipient validation, bounded retries, delivery error handling, 
setup documentation, and automated tests.
   
   Initial scope excludes scheduled reports, private/shared channels, direct 
messages, file attachments, and interactive cards.
   
   Related discussion: https://github.com/apache/superset/discussions/45307
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before: Microsoft Teams is not available as a notification destination.
   
   After: Users can select an administrator-approved Teams destination and 
receive alert cards in its channel.
   
   **Teams destination selection**
   
   <img width="1000" alt="Selecting an approved Microsoft Teams destination in 
the Superset alert editor" 
src="https://github.com/user-attachments/assets/b0c02bb8-7604-4453-aa35-eed7a61c4bcd";
 />
   
   **Delivered alerts, including successful delivery after bot reinstallation**
   
   <img width="1000" alt="Separate alert posts delivered by Superset to the 
test Microsoft Teams channel" 
src="https://github.com/user-attachments/assets/dcb381c2-0005-42b6-be7f-246be843fe32";
 />
   
   Credentials are configured server-side, not through an administrator UI.
   
   ### TESTING INSTRUCTIONS
   
   1. Install the `teams` extra on the web server and Celery worker.
   2. Enable `ALERT_REPORT_TEAMS` and configure the tenant, bot credentials, 
and approved destinations.
   3. Apply the migration and configure the bot's HTTPS callback.
   4. Install the bot in an approved team.
   5. Create an alert with attachments disabled and select a Teams destination.
   6. Trigger two deliveries and confirm they appear as separate channel posts.
   7. Remove the bot and confirm delivery fails clearly. Reinstall it and 
confirm delivery recovers.
   
   Validation completed locally:
   - 308 focused backend tests passed after test cleanup.
   - Frontend component tests and TypeScript checks passed during feature 
validation. The browser create/edit flow passed with local selector fixes that 
are not included in this draft yet.
   - Migration upgrade, downgrade, and re-upgrade passed.
   - Live Celery delivery to a non-default standard channel passed.
   - Delivery after web and worker restarts passed.
   - Fresh removal and reinstallation callbacks passed, including delivery 
failure and recovery.
   - Pre-commit was run across all branch-changed files. Mypy, frontend type 
checking, formatting, linting, feature-flag documentation sync, and workflow 
security checks passed. The custom Pylint hook could not load 
`superset.extensions.pylint` in the local hook environment, so that check 
remains unverified.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
     Related discussion: https://github.com/apache/superset/discussions/45307
   - [x] Required feature flags: `ALERT_REPORTS`, `ALERT_REPORT_TEAMS`
   - [x] Changes UI
   - [x] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [x] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [x] Introduces new feature or API
   - [ ] Removes existing 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]

Reply via email to