endimonan opened a new pull request, #42640: URL: https://github.com/apache/superset/pull/42640
### SUMMARY Fixes #32858. CSV email reports always used a `.csv` attachment name, even when the chart data endpoint returned a ZIP archive for multiple queries, such as a server-paginated table. This selects the attachment extension from the returned payload signature, using `.zip` for bundled responses while preserving `.csv` for single-file and streamed responses. Regression coverage includes plain CSV content, bundled CSV archives, truncated archives that retain the ZIP signature, and the existing XLSX attachment behavior. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Not applicable — this is a backend-only change to the generated email attachment filename. The linked issue includes screenshots of the reported behavior. ### TESTING INSTRUCTIONS 1. Create a table chart and enable server pagination. 2. Configure an email report with **Send as CSV**. 3. Trigger the report and verify that the bundled attachment uses the `.zip` extension and contains one CSV file per query. 4. Repeat with a chart that returns a single CSV response and verify that the attachment keeps the `.csv` extension. Run: `pytest tests/unit_tests/reports/notifications/email_tests.py` Automated validation: - Focused email notification suite: 14 tests passed (reported). - Neighboring report notification suites: 538 tests passed (reported). - Ruff format and lint checks for both changed files: passed on the Windows host. - Pylint: 10.00/10 (reported). - MyPy: no errors in the changed production file (reported). - Focused `pre-commit` Ruff hooks: passed. - `pre-commit run --all-files` was attempted on Windows but did not complete because WSL-backed hooks timed out; no failure against the changed files was reported. ### ADDITIONAL INFORMATION - [x] Has associated issue: Fixes #32858 - [ ] 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 -- 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]
