Repository navigation
fix(connection): let SupersetClient.postForm accept an absolute url - #45204
Conversation
postForm only took an endpoint, so exploreChart (used by the SQL Lab CTAS
Explore button) passed an absolute URL that got the app root prefixed onto
it. postForm now accepts either an endpoint string (unchanged, so existing
positional callers keep working) or a { endpoint, url } object, where url is
used as is.
Supersedes #38069.
Co-Authored-By: Martyn Gigg <[email protected]>
Co-Authored-By: Evan Rusackas <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
CodeAnt PR Risk: Low Risk
Assessed commit: |
Co-Authored-By: Evan Rusackas <[email protected]> Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
martyngigg
left a comment
There was a problem hiding this comment.
I've tested out the explore button from a CTAS query in SQL lab and it posts to the correct URL and shows the expected chart.
Co-Authored-By: Evan Rusackas <[email protected]> Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
aminghadersohi
left a comment
There was a problem hiding this comment.
Mutation-tested postForm: dropping the client-host entry fails the new https://host test, dropping the page origin fails the localhost one, and disabling the throw fails the cross-origin test, so the token guard is pinned. Nit: renaming the inner target (e.g. targetUrl) avoids a shadow.
|
Yep, that's the last of it! The backend next-param piece had already landed via #37942, and the rest of the app-root plumbing came in piecemeal elsewhere, so the postForm doubling here was genuinely the only bit still outstanding. Feel free to close #38069 whenever, I'll link it from there too. Thanks for catching the original bug, and no worries on the silence, that happens to all of us. You're on the fix commit as a co-author, so it'll show up as yours on the repo. Looking forward to the next one :) |
…45204) Co-authored-by: Martyn Gigg <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]> (cherry picked from commit f18c034)
SUMMARY
Picking up #38069 from a fresh branch (thanks @martyngigg for the original work). Most of that PR already landed on master via other PRs, so what was left is small.
exploreCharthandsgetExploreUrl's absolute URL topostFormas an endpoint, so the SQL Lab CTAS Explore button posts to something likehttps://host/<root>/https://host/explore/...when an app root is set.postFormnow takes either the existing endpoint string (so positional callers, includingDrillDetailPane, keep working) or a{ endpoint, url }object whereurlis used as is.exploreChartuses theurlform.Supersedes #38069.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
Set
SUPERSET_APP_ROOT=/analytics, run a SQL Lab query with CTAS and click Explore. The posted URL should not contain the host twice. I did not run jest or the frontend hooks locally (node_modules lockfile mismatch in my worktree), so CI is the first real run.ADDITIONAL INFORMATION
🤖 Generated with Claude Code