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

   ### SUMMARY
   
   This is a **test-only PR** opened as a TDD-style validation of issue #25538.
   
   #25538 (filed 2023-10) reports that after upgrading from Superset 2.1.0 to 
3.0.0, a table chart with a *last 30 days* time filter sends a 14-row CSV in 
2.1.0 but a 219-row CSV (the full unfiltered table) in 3.0.0 — even though the 
same chart in the UI and as an image still shows only the 14 filtered rows.
   
   The mechanism that ensures the chart's saved query_context (including time 
filters) is applied to the CSV is the `type=POST_PROCESSED` flag on the 
`ChartDataRestApi.get_data` URL emitted by `BaseReportState._get_url`. A 
regression that emitted `type=FULL` or omitted `type` would re-introduce the 
original bug.
   
   This PR adds one regression test:
   
   1. **`test_get_url_for_csv_uses_post_processed_type`** — constructs a 
`BaseReportState` for a chart-based schedule, calls 
`_get_url(result_format=CSV)`, and asserts `format=csv` AND 
`type=post_processed` appear in the URL.
   
   ### How to interpret CI
   
   - **CI green** → the CSV URL still uses POST_PROCESSED; merging closes 
#25538 and locks in the regression guard.
   - **CI red** → the URL no longer carries POST_PROCESSED. Likely suspect: 
`superset/commands/report/execute.py::BaseReportState._get_url`.
   
   ### TESTING INSTRUCTIONS
   
   \`\`\`bash
   pytest 
tests/unit_tests/commands/report/execute_test.py::test_get_url_for_csv_uses_post_processed_type
 -v
   \`\`\`
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: closes #25538
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] 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