You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "250715122 (via GitHub)" <gi...@apache.org> on 2026/05/19 08:29:43 UTC
[PR] Orphan doc update 2026 05 19 [superset]
250715122 opened a new pull request, #40239:
URL: https://github.com/apache/superset/pull/40239
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] Orphan doc update 2026 05 19 [superset]
Posted by "250715122 (via GitHub)" <gi...@apache.org>.
250715122 commented on PR #40239:
URL: https://github.com/apache/superset/pull/40239#issuecomment-4485947845
Apologies — this PR was created by mistake via GitHub's "Compare & pull request"
prompt on a backup/archive branch in my fork. The branch is not intended to be
merged upstream. Closing now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] Orphan doc update 2026 05 19 [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #40239:
URL: https://github.com/apache/superset/pull/40239#discussion_r3264840074
##########
superset/initialization/__init__.py:
##########
@@ -987,7 +987,7 @@ def enable_profiling(self) -> None:
class SupersetIndexView(IndexView):
@expose("/")
def index(self) -> FlaskResponse:
- return redirect(url_for("Superset.welcome"))
+ return redirect("/dashboard/list/")
Review Comment:
**Suggestion:** The root index now hard-redirects to an absolute `"/dashboard/list/"`, which bypasses `APPLICATION_ROOT`/`SUPERSET_APP_ROOT` handling. In subdirectory deployments (for example `/superset`), this sends users to a URL outside the mounted prefix and can produce 404s via `AppRootMiddleware`. Build the redirect with a route helper (`url_for`/AppBuilder URL helper) so the app root prefix is preserved. [logic error]
<details>
<summary><b>Severity Level:</b> Critical 🚨</summary>
```mdx
- ❌ Root URL 404s when APP_ROOT prefix is configured.
- ⚠️ Breaks navigation for subdirectory deployments using AppRootMiddleware.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Configure Superset to run under a non-root app root by calling
`create_app(superset_app_root="/superset")`, as exercised in
`tests/unit_tests/initialization_test.py:61-69` where `AppRootMiddleware` is attached with
`app_root` and `PATH_INFO` must start with that prefix.
2. Start the app and browse to the external root URL `/superset/`;
`AppRootMiddleware.__call__` in `superset/app.py:80-102` strips the `/superset` prefix
from `PATH_INFO` and forwards the request with `PATH_INFO="/"` into the Flask app.
3. The root route is handled by `SupersetIndexView.index` in
`superset/initialization/__init__.py:987-991`, which for `@expose("/")` executes `return
redirect("/dashboard/list/")`, emitting a 302 Location header pointing to the absolute
path `/dashboard/list/` (no `/superset` prefix).
4. The browser follows the redirect to `/dashboard/list/`; `AppRootMiddleware.__call__` in
`superset/app.py:95-104` now receives `PATH_INFO="/dashboard/list/"`, which does not start
with `app_root="/superset"`, so it returns `NotFound()`, producing an HTTP 404 instead of
the dashboard list page for any subdirectory deployment.
```
</details>
[Fix in Cursor](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=eb5c84ac2ab14742829ff901289dafb9&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) | [Fix in VSCode Claude](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=eb5c84ac2ab14742829ff901289dafb9&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/initialization/__init__.py
**Line:** 990:990
**Comment:**
*Logic Error: The root index now hard-redirects to an absolute `"/dashboard/list/"`, which bypasses `APPLICATION_ROOT`/`SUPERSET_APP_ROOT` handling. In subdirectory deployments (for example `/superset`), this sends users to a URL outside the mounted prefix and can produce 404s via `AppRootMiddleware`. Build the redirect with a route helper (`url_for`/AppBuilder URL helper) so the app root prefix is preserved.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40239&comment_hash=4e5eda188642193190cbb7ca3340161653200c9442fe0aa0c7c00b07a514d443&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40239&comment_hash=4e5eda188642193190cbb7ca3340161653200c9442fe0aa0c7c00b07a514d443&reaction=dislike'>👎</a>
##########
superset/views/base.py:
##########
@@ -282,7 +281,7 @@ def menu_data(user: User) -> dict[str, Any]:
return {
"menu": appbuilder.menu.get_data(),
"brand": {
- "path": app.config["LOGO_TARGET_PATH"] or url_for("Superset.welcome"),
+ "path": app.config["LOGO_TARGET_PATH"] or "/dashboard/list/",
Review Comment:
**Suggestion:** Forcing a fallback to `"/dashboard/list/"` changes the documented contract of `LOGO_TARGET_PATH` (default `None` should route to welcome) and bypasses the existing welcome-page flow. This can send users without dashboard-list permissions to an unauthorized landing path and removes the expected default behavior; keep the fallback aligned with the configured welcome target instead of dashboard list. [api mismatch]
<details>
<summary><b>Severity Level:</b> Critical 🚨</summary>
```mdx
- ❌ Logo default target conflicts with documented LOGO_TARGET_PATH behavior.
- ❌ Logo link breaks under subdirectory AppRootMiddleware deployments.
- ⚠️ Users lose personalized welcome landing page experience.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Run Superset with the default configuration where `LOGO_TARGET_PATH = None` as defined
and documented in `superset/config.py:22-26`, which states "Default value of None will
take you to '/superset/welcome'".
2. Render any SPA page that uses `common_bootstrap_payload`, such as the personalized
welcome page `Superset.welcome` exposed at `/welcome/` in
`superset/views/core.py:932-943`, which calls `common_bootstrap_payload()` from
`superset/views/base.py:31-35`.
3. Inside `common_bootstrap_payload`, `cached_common_bootstrap_data` is invoked and builds
`bootstrap_data` including `"menu_data": menu_data(g.user)` at
`superset/views/base.py:520-545`; `menu_data` in `superset/views/base.py:269-36` computes
`"brand": {"path": app.config["LOGO_TARGET_PATH"] or "/dashboard/list/", ...}`, so with
`LOGO_TARGET_PATH` set to `None` the effective logo target becomes `"/dashboard/list/"`
instead of the documented `/superset/welcome`.
4. The SPA receives this `menu_data` via the `bootstrap_data` payload (`"menu_data":
menu_data(g.user)` at `superset/views/base.py:540-545`) and uses `brand["path"]` for the
application logo link; with default config the logo now navigates to `/dashboard/list/`,
breaking the documented contract in `superset/config.py:22-24`, and in subdirectory
deployments the absolute `/dashboard/list/` path further bypasses the `AppRootMiddleware`
prefix in `superset/app.py:80-102`, leading to a 404 for logo clicks.
```
</details>
[Fix in Cursor](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=0820637282044edda09c3c0bd7c097f7&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) | [Fix in VSCode Claude](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=0820637282044edda09c3c0bd7c097f7&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/views/base.py
**Line:** 284:284
**Comment:**
*Api Mismatch: Forcing a fallback to `"/dashboard/list/"` changes the documented contract of `LOGO_TARGET_PATH` (default `None` should route to welcome) and bypasses the existing welcome-page flow. This can send users without dashboard-list permissions to an unauthorized landing path and removes the expected default behavior; keep the fallback aligned with the configured welcome target instead of dashboard list.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40239&comment_hash=fa169a0fec3a85d99ae8079b1d2a4d8bc08a8d0b15e28cec11f59e0a0cd8d96d&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40239&comment_hash=fa169a0fec3a85d99ae8079b1d2a4d8bc08a8d0b15e28cec11f59e0a0cd8d96d&reaction=dislike'>👎</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] Orphan doc update 2026 05 19 [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #40239:
URL: https://github.com/apache/superset/pull/40239#discussion_r3264846325
##########
superset/initialization/__init__.py:
##########
@@ -987,7 +987,7 @@ def enable_profiling(self) -> None:
class SupersetIndexView(IndexView):
@expose("/")
def index(self) -> FlaskResponse:
- return redirect(url_for("Superset.welcome"))
+ return redirect("/dashboard/list/")
Review Comment:
**🟠 Architect Review — HIGH**
The root index view now redirects with a hardcoded "/dashboard/list/" path instead of using Flask routing, so in subdirectory deployments (APPLICATION_ROOT / AppRootMiddleware, e.g. "/superset") hitting the app root will redirect to "/dashboard/list/" at the site root, bypassing the configured prefix and breaking navigation.
**Suggestion:** Build the redirect target via Flask routing or the existing app-root-aware URL helper (for example url_for or superset.utils.urls.get_url_path for the desired landing view) so the generated URL correctly includes the configured application root or SCRIPT_NAME in all deployments.
[Fix in Cursor](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=1d25d31d5c864926b76ecdfc9af9e1dd&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) | [Fix in VSCode Claude](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=1d25d31d5c864926b76ecdfc9af9e1dd&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is an **Architect / Logical Review** comment left during a code review. These reviews are first-class, important findings — not optional suggestions. Do NOT dismiss this as a 'big architectural change' just because the title says architect review; most of these can be resolved with a small, localized fix once the intent is understood.
**Path:** superset/initialization/__init__.py
**Line:** 990:990
**Comment:**
*HIGH: The root index view now redirects with a hardcoded "/dashboard/list/" path instead of using Flask routing, so in subdirectory deployments (APPLICATION_ROOT / AppRootMiddleware, e.g. "/superset") hitting the app root will redirect to "/dashboard/list/" at the site root, bypassing the configured prefix and breaking navigation.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
If a suggested approach is provided above, use it as the authoritative instruction. If no explicit code suggestion is given, you MUST still draft and apply your own minimal, localized fix — do not punt back with 'no suggestion provided, review manually'. Keep the change as small as possible: add a guard clause, gate on a loading state, reorder an await, wrap in a conditional, etc. Do not refactor surrounding code or expand scope beyond the finding.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] Orphan doc update 2026 05 19 [superset]
Posted by "250715122 (via GitHub)" <gi...@apache.org>.
250715122 closed pull request #40239: Orphan doc update 2026 05 19
URL: https://github.com/apache/superset/pull/40239
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] Orphan doc update 2026 05 19 [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #40239:
URL: https://github.com/apache/superset/pull/40239#issuecomment-4485860152
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org