-
Notifications
You must be signed in to change notification settings - Fork 16.6k
feat: provide full endpoint URL construction for plugin developers #37360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: provide full endpoint URL construction for plugin developers #37360
Conversation
Code Review Agent Run #a313b2Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code Review Agent Run #24a77fActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR exposes the existing getUrl() method from SupersetClientClass through the SupersetClient singleton interface, enabling external plugin developers to construct fully-qualified Superset endpoint URLs with the correct application root prefix.
Changes:
- Exposed
getUrlmethod throughSupersetClientsingleton wrapper - Added
getUrlto theSupersetClientInterfacetype definition - Updated test suite to verify the new public API surface
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| superset-frontend/packages/superset-ui-core/src/connection/SupersetClient.ts | Added delegation from SupersetClient.getUrl to underlying SupersetClientClass instance |
| superset-frontend/packages/superset-ui-core/src/connection/types.ts | Added getUrl to the SupersetClientInterface Pick type |
| superset-frontend/packages/superset-ui-core/test/connection/SupersetClient.test.ts | Updated tests to include getUrl in method exposure checks and pre-configuration error checks |
superset-frontend/packages/superset-ui-core/test/connection/SupersetClient.test.ts
Show resolved
Hide resolved
|
Yes, adding a functional test for superset-frontend/packages/superset-ui-core/test/connection/SupersetClient.test.ts |
|
@martyngigg mind taking a look at this? |
|
Did you want to address or refute the bot suggestion before merging? |
|
@rusackas |
Code Review Agent Run #1c0feaActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
martyngigg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sadpandajoe Sorry for the delay in getting to this.
It seems to make sense to me and exposes an existing method with extra tests so I can't see an issue.
SUMMARY
This PR provides plugin developers with the ability to construct fully-qualified Superset endpoint URLs, including the application root prefix, regardless of deployment configuration.
The Core Problem
External plugins lack access to Superset's deployment context and cannot reliably construct endpoint URLs. When Superset is deployed at a non-root path (e.g., /superset, /analytics, custom prefix), plugins have no way to know this prefix and thus cannot create correct URLs.
Solution
Expose a
getUrl()method viaSupersetClient(already available through@superset-ui/core) that resolves paths with the correct application context.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION