Skip to content

fix(bootstrapData): Missing application_root data throws an error - #34680

Merged
michael-s-molina merged 2 commits into
apache:masterfrom
justinpark:hotfix--missing_app_root_throws_errors
Aug 14, 2025
Merged

michael-s-molina merged 2 commits into
apache:masterfrom
justinpark:hotfix--missing_app_root_throws_errors

Conversation

@justinpark

@justinpark justinpark commented Aug 13, 2025 •

Copy link
Copy Markdown
Member

SUMMARY

When adding the application_root bootstrap 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:

_DEV__Superset

After:

_DEV__Superset

TESTING INSTRUCTIONS

Run superset without configure the SUPERSET_APP_ROOT

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

@dosubot dosubot Bot added the change:frontend Requires changing the frontend label Aug 13, 2025

@korbit-ai korbit-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Functionality Premature Bootstrap Data Access ▹ view 🧠 Incorrect
Design 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.

Loving Korbit!? Share us on LinkedIn Reddit and X

Comment on lines +36 to +39
const APPLICATION_ROOT_NO_TRAILING_SLASH = (
getBootstrapData().common.application_root ??
DEFAULT_BOOTSTRAP_DATA.common.application_root
).replace(/\/$/, '');

This comment was marked as resolved.

Comment on lines +36 to +44
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.

@justinpark

Copy link
Copy Markdown
Member Author

cc: @martyngigg

@michael-s-molina
michael-s-molina merged commit 1101182 into apache:master Aug 14, 2025
LisaHusband pushed a commit to LisaHusband/superset that referenced this pull request Aug 17, 2025
@bxter

bxter commented Aug 19, 2025

Copy link
Copy Markdown

when can release a version with support application_root??

@martyngigg

@martyngigg

Copy link
Copy Markdown
Contributor

when can release a version with support application_root??

@martyngigg

@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

@dosubot dosubot Bot mentioned this pull request Aug 20, 2025
3 tasks done
@dosubot dosubot Bot mentioned this pull request Aug 28, 2025
3 tasks
@dosubot dosubot Bot mentioned this pull request Sep 5, 2025
3 tasks done
@github-actions github-actions Bot added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 6.0.0 First shipped in 6.0.0 labels Dec 18, 2025
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels change:frontend Requires changing the frontend size/M 🚢 6.0.0 First shipped in 6.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants