8000 fix: add subdirectory deployment support for brandSpinnerUrl by innovark37 · Pull Request #37523 · apache/superset · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@innovark37
Copy link
Contributor

SUMMARY

This PR fixes theme token handling for subdirectory deployments by ensuring brandSpinnerUrl gets properly prefixed with the application root path, similar to how brandLogoUrl and APP_ICON are already handled.

Problem

When Superset is deployed under a subdirectory (e.g., /superset/, /analytics/), the loading spinner image (brandSpinnerUrl) would break because its URL wasn't being prefixed with the application root. This caused 404 errors for the spinner image in non-root deployments.

Root Cause

The application initialization code already handled brandLogoUrl and APP_ICON for subdirectory deployments, but missed brandSpinnerUrl, which is another theme token that references static assets.

Solution

Extend the existing subdirectory handling logic to include brandSpinnerUrl token, applying the same pattern used for brandLogoUrl.

TESTING INSTRUCTIONS

  1. Create test theme configuration:
THEME_DEFAULT = {
   "token": {
       "brandSpinnerUrl": "/static/assets/images/loading.gif",
   },
   "algorithm": "default",
}
  1. Start Superset with subdirectory deployment:
SUPERSET_APP_ROOT=/analytics
  1. Verify loading spinner appears

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

@bito-code-review
Copy link
Contributor
bito-code-review bot commented Jan 28, 2026

Code Review Agent Run #f98b39

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: aa970ee..aa970ee
    • superset/app.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot bot added the global:theming Related to theming Superset label Jan 28, 2026
@codecov
Copy link
codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.58%. Comparing base (76d897e) to head (aa970ee).
⚠️ Report is 3536 commits behind head on master.

Files with missing lines Patch % Lines
superset/app.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #37523      +/-   ##
==========================================
+ Coverage   60.48%   66.58%   +6.09%     
==========================================
  Files        1931      643    -1288     
  Lines       76236    49051   -27185     
  Branches     8568     5501    -3067     
==========================================
- Hits        46114    32661   -13453     
+ Misses      28017    15095   -12922     
+ Partials     2105     1295     -810     
Flag Coverage Δ
hive 41.91% <0.00%> (-7.24%) ⬇️
javascript ?
mysql 64.64% <0.00%> (?)
postgres 64.72% <0.00%> (?)
presto 41.93% <0.00%> (-11.87%) ⬇️
python 66.55% <0.00%> (+3.05%) ⬆️
sqlite 64.42% <0.00%> (?)
unit 100.00% <ø> (+42.36%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

global:theming Related to theming Superset size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0