Repository navigation
fix(bootstrapData): Missing application_root data throws an error - #34680
michael-s-molina merged 2 commits into
Conversation
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Premature Bootstrap Data Access ▹ view | 🧠 Incorrect | |
| Duplicate Path Normalization Logic ▹ view | ✅ Fix detected |
Files scanned
| File Path | Reviewed |
|---|---|
| superset-frontend/src/utils/getBootstrapData.ts | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
| const APPLICATION_ROOT_NO_TRAILING_SLASH = ( | ||
| getBootstrapData().common.application_root ?? | ||
| DEFAULT_BOOTSTRAP_DATA.common.application_root | ||
| ).replace(/\/$/, ''); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| const APPLICATION_ROOT_NO_TRAILING_SLASH = ( | ||
| getBootstrapData().common.application_root ?? | ||
| DEFAULT_BOOTSTRAP_DATA.common.application_root | ||
| ).replace(/\/$/, ''); | ||
|
|
||
| const STATIC_ASSETS_PREFIX_NO_TRAILING_SLASH = | ||
| getBootstrapData().common.static_assets_prefix.replace(/\/$/, ''); | ||
| const STATIC_ASSETS_PREFIX_NO_TRAILING_SLASH = ( | ||
| getBootstrapData().common.static_assets_prefix ?? | ||
| DEFAULT_BOOTSTRAP_DATA.common.static_assets_prefix | ||
| ).replace(/\/$/, ''); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
cc: @martyngigg |
|
when can release a version with support application_root?? |
@bxter While I contributed the feature I'm not a maintainer so I can't say when it will be released I'm afraid. I think v6.0 is about to be cut and it looks like it is in the RC: https://github.com/apache/superset/blob/6.0.0rc1/CHANGELOG/6.0.0.md |
SUMMARY
When adding the
application_rootbootstrap data in #30134, an issue arose where the frontend would always throw an error if this data was not previously included. This commit fixes the error by referencing the default value when the bootstrap data is not provided, just as it does for other default values.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
TESTING INSTRUCTIONS
Run superset without configure the
SUPERSET_APP_ROOTADDITIONAL INFORMATION