richardfogaca opened a new pull request, #40712: URL: https://github.com/apache/superset/pull/40712
### SUMMARY This fixes embedded dashboard streaming CSV exports for table-like charts whose row limit enters the large-export path. Previously, the streaming export hook built a native `fetch` form request with chart export fields but did not include the active embedded guest token. Embedded users could load the dashboard, but the CSV export POST reached the chart data API without guest-auth material and failed before returning the CSV. The change adds the configured guest token to the streaming export form body when one is present. Backend guest authentication remains the authority; the frontend only transports the existing token on the native streaming request path. The regression test covers the token-bearing case while existing hook coverage keeps the no-token and adjacent streaming behaviors intact. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A - no public screenshot or recording is attached to this PR. The verified behavior is described in the testing instructions below. ### TESTING INSTRUCTIONS - Live browser validation in a local Superset compose runtime: opened an embedded dashboard host with a guest token, used the chart More Options → Download → Export to .CSV flow for a table chart with `row_limit=100000`, and observed the CSV Export modal reach the successful state with a Download button. Regression condition: the previous export failure/401 state did not recur. - Live API/network validation in the same local runtime: inspected the chart export POST to `/api/v1/chart/data` from that embedded export scenario and observed `guest_token` and `expected_rows=100000` in the submitted form, plus a `200 OK` `text/csv` response with CSV rows. Regression condition: the request no longer omitted embedded auth material or returned the prior unauthorized export failure. - Focused regression command: `npm run test -- src/components/StreamingExportModal/useStreamingExport.test.ts` ### 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 Reviewer focus: this is intentionally limited to the streaming export request builder and its tests; it should not change backend authorization rules, export thresholds, or provider-specific SQL execution. -- 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]
