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

   ### SUMMARY
   When an alert or report fails, this PR adds the ability to capture a 
screenshot of the current state and include it in the error notification email 
sent to owners. This helps admins/owners quickly identify issues without 
needing to navigate to the dashboard or chart.
   
   **Key changes:**
   - Modified `send_error()` in `superset/commands/report/execute.py` to 
attempt screenshot capture before sending error notifications
   - Updated email notification templates in 
`superset/reports/notifications/email.py` to include inline screenshot images
   - Added comprehensive unit tests for error emails with and without 
screenshots
   - Implemented best-effort approach: screenshots are captured if possible, 
but failures don't prevent error notifications from being sent
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   **Before:** Error emails only contained text describing the error
   
   **After:** Error emails include a screenshot showing the state of the 
dashboard/chart at the time of failure (when screenshot capture is successful)
   
   ### TESTING INSTRUCTIONS
   1. Set up an alert or report that will fail (e.g., configure it to run on a 
broken dashboard or chart)
   2. Trigger the alert/report execution
   3. Verify that:
      - Error notification email is sent to the owner
      - Email includes a screenshot of the dashboard/chart (if screenshot 
capture succeeded)
      - Email still sends even if screenshot capture fails
   4. Run unit tests: `pytest 
tests/unit_tests/reports/notifications/email_tests.py -v`
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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