You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mistercrunch (via GitHub)" <gi...@apache.org> on 2025/09/23 04:05:44 UTC
[PR] refactor: remove obsolete Flask flash messaging system [superset]
mistercrunch opened a new pull request, #35237:
URL: https://github.com/apache/superset/pull/35237
The Flask flash message system is a legacy feature from when Superset was a server-rendered application. In the current SPA architecture, these messages are never displayed to users because:
- Flash messages only render on page load via FlashProvider's componentDidMount
- Modern UI interactions use async API calls that don't trigger page reloads
- The main consumer (/explore/ POST endpoint) is already marked @deprecated
All user-facing notifications are already handled by the frontend toast system, including chart save operations (see saveModalActions.ts) which dispatches success toasts for:
- Chart saved/overwritten
- Chart added to dashboard
- New dashboard created with chart
Changes:
- Backend: Removed all flash() calls from views (14 occurrences in 4 files)
- Backend: Converted error flashes to JSON responses or logging
- Backend: Removed redirect_with_flash utility function
- Frontend: Deleted FlashProvider component and tests
- Frontend: Removed flash_messages from CommonBootstrapData type
- Frontend: Cleaned up context providers and test fixtures
- Frontend: Removed unused getBootstrapData imports
The application now relies entirely on client-side toast notifications for user feedback, which properly support async operations and provide a consistent UX.
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2374651418
##########
superset/views/base.py:
##########
@@ -596,7 +591,7 @@ def _delete(self: BaseView, primary_key: int) -> None:
try:
self.pre_delete(item)
except Exception as ex: # pylint: disable=broad-except
- flash(str(ex), "danger")
+ logger.error("Pre-delete error: %s", str(ex))
Review Comment:
this probably never should have gone through to user
##########
superset/views/base.py:
##########
@@ -629,7 +623,7 @@ def muldelete(self: BaseView, items: list[Model]) -> FlaskResponse:
try:
self.pre_delete(item)
except Exception as ex: # pylint: disable=broad-except
- flash(str(ex), "danger")
+ logger.error("Pre-delete error: %s", str(ex))
Review Comment:
this probably never should have gone through to user
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2374670609
##########
superset/views/core.py:
##########
@@ -652,13 +636,6 @@ def save_or_overwrite_slice( # noqa: C901
_("You don't have the rights to alter this dashboard"),
status=403,
)
-
- flash(
- _("Chart [{}] was added to dashboard [{}]").format(
Review Comment:
tested that chart adding to dashboard is handled frontend now and flashed properly without these obsolete flash messages
##########
superset/views/core.py:
##########
@@ -673,12 +650,6 @@ def save_or_overwrite_slice( # noqa: C901
dashboard_title=request.args.get("new_dashboard_name"),
owners=[g.user] if g.user else [],
)
- flash(
- _(
- "Dashboard [{}] just got created and chart [{}] was added to it"
Review Comment:
tested that chart adding to dashboard is handled frontend now and flashed properly without these obsolete flash messages
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2373790294
##########
superset-frontend/src/dashboard/actions/hydrate.js:
##########
@@ -274,7 +274,6 @@ export const hydrateDashboard =
superset_can_csv: findPermission('can_csv', 'Superset', roles),
common: {
// legacy, please use state.common instead
- flash_messages: common?.flash_messages,
Review Comment:
Answer is case by case, but short answer is "as they should" from async calls. Checked that most had been re-implemented the right way since they were used. Also confirmed that old mechanics are to surface "on the next page load", which has very few pre-determined triggers, stuff like logging in maybe.
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2373797006
##########
superset/views/auth.py:
##########
@@ -66,7 +65,7 @@ def activation(self, activation_hash: str) -> WerkzeugResponse:
reg = self.appbuilder.sm.find_register_user(activation_hash)
if not reg:
logger.error(LOGMSG_ERR_SEC_NO_REGISTER_HASH, activation_hash)
- flash(as_unicode(self.false_error_message), "danger")
+ logger.error("Registration activation failed: %s", self.false_error_message)
Review Comment:
Let me confirm that logging in is a SPA operation as it should be as opposed to a backend-round-trip.
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2374654659
##########
superset/views/core.py:
##########
@@ -440,18 +438,8 @@ def explore( # noqa: C901
dataset_id = request.args.get("dataset_id")
if slice_id:
initial_form_data["slice_id"] = slice_id
- if form_data_key:
- flash(
- _("Form data not found in cache, reverting to chart metadata.")
Review Comment:
part of a function flagged as @deprecated
##########
superset/views/core.py:
##########
@@ -440,18 +438,8 @@ def explore( # noqa: C901
dataset_id = request.args.get("dataset_id")
if slice_id:
initial_form_data["slice_id"] = slice_id
- if form_data_key:
- flash(
- _("Form data not found in cache, reverting to chart metadata.")
- )
elif dataset_id:
initial_form_data["datasource"] = f"{dataset_id}__table"
- if form_data_key:
- flash(
- _(
- "Form data not found in cache, reverting to dataset metadata." # noqa: E501
Review Comment:
part of a function flagged as @deprecated
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2371067532
##########
superset/views/core.py:
##########
@@ -804,11 +787,7 @@
else:
redirect_url = url_for("DashboardModelView.list")
warn_msg = utils.error_msg_from_exception(ex)
- return redirect_with_flash(
- url=redirect_url,
- message=warn_msg,
- category="danger",
- )
+ return redirect(f"{redirect_url}?error={parse.quote(warn_msg)}")
Review Comment:
## URL redirection from remote source
Untrusted URL redirection depends on a [user-provided value](1).
[Show more details](https://github.com/apache/superset/security/code-scanning/2055)
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2373838227
##########
superset/views/auth.py:
##########
@@ -66,7 +65,7 @@ def activation(self, activation_hash: str) -> WerkzeugResponse:
reg = self.appbuilder.sm.find_register_user(activation_hash)
if not reg:
logger.error(LOGMSG_ERR_SEC_NO_REGISTER_HASH, activation_hash)
- flash(as_unicode(self.false_error_message), "danger")
+ logger.error("Registration activation failed: %s", self.false_error_message)
Review Comment:
Mitigated with a toast, but had to keep the round trip (same as now) at least for 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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2374766771
##########
superset/views/core.py:
##########
@@ -796,19 +767,9 @@ def dashboard(
try:
dashboard.raise_for_access()
- except SupersetSecurityException as ex:
- # anonymous users should get the login screen, others should go to dashboard list # noqa: E501
- if g.user is None or g.user.is_anonymous:
- redirect_url = f"{appbuilder.get_url_for_login}?next={request.url}"
- warn_msg = "Users must be logged in to view this dashboard."
- else:
- redirect_url = url_for("DashboardModelView.list")
- warn_msg = utils.error_msg_from_exception(ex)
- return redirect_with_flash(
- url=redirect_url,
- message=warn_msg,
- category="danger",
- )
+ except SupersetSecurityException:
+ # Return 404 to avoid revealing dashboard existence
+ abort(404)
Review Comment:
404 is most accurate when you don't have access
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2377065570
##########
superset/views/core.py:
##########
@@ -796,19 +767,9 @@ def dashboard(
try:
dashboard.raise_for_access()
- except SupersetSecurityException as ex:
- # anonymous users should get the login screen, others should go to dashboard list # noqa: E501
- if g.user is None or g.user.is_anonymous:
- redirect_url = f"{appbuilder.get_url_for_login}?next={request.url}"
- warn_msg = "Users must be logged in to view this dashboard."
- else:
- redirect_url = url_for("DashboardModelView.list")
- warn_msg = utils.error_msg_from_exception(ex)
- return redirect_with_flash(
- url=redirect_url,
- message=warn_msg,
- category="danger",
- )
+ except SupersetSecurityException:
+ # Return 404 to avoid revealing dashboard existence
+ abort(404)
Review Comment:
Yep... it's even in the official [spec](https://www.rfc-editor.org/rfc/rfc9110.html) for 403 (I got curious):
> An origin server that wishes to "hide" the current existence of a forbidden [target resource](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) MAY instead respond with a status code of [404 (Not Found)](https://www.rfc-editor.org/rfc/rfc9110.html#status.404).
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2373790294
##########
superset-frontend/src/dashboard/actions/hydrate.js:
##########
@@ -274,7 +274,6 @@ export const hydrateDashboard =
superset_can_csv: findPermission('can_csv', 'Superset', roles),
common: {
// legacy, please use state.common instead
- flash_messages: common?.flash_messages,
Review Comment:
Answer is case by case, but short answer is "as they should" from async calls. Checked that most had been re-implemented the right way since they were used.
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2374652532
##########
superset/views/base.py:
##########
@@ -596,7 +591,7 @@ def _delete(self: BaseView, primary_key: int) -> None:
try:
self.pre_delete(item)
except Exception as ex: # pylint: disable=broad-except
- flash(str(ex), "danger")
+ logger.error("Pre-delete error: %s", str(ex))
Review Comment:
You're right. This change improves the error handling by logging it for developers instead of displaying it to users, which is more appropriate for this type of error.
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2374729447
##########
superset/views/utils.py:
##########
@@ -551,8 +550,3 @@ def get_cta_schema_name(
if not func:
return None
return func(database, user, schema, sql)
-
-
-def redirect_with_flash(url: str, message: str, category: str) -> Response:
Review Comment:
not used anymore
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2373006658
##########
superset-frontend/src/dashboard/actions/hydrate.js:
##########
@@ -274,7 +274,6 @@ export const hydrateDashboard =
superset_can_csv: findPermission('can_csv', 'Superset', roles),
common: {
// legacy, please use state.common instead
- flash_messages: common?.flash_messages,
Review Comment:
Question from review session: Where are server-side messages being processed/summoned now that they're not provided as part of the bootstrap data?
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2373013454
##########
superset/views/auth.py:
##########
@@ -66,7 +65,7 @@ def activation(self, activation_hash: str) -> WerkzeugResponse:
reg = self.appbuilder.sm.find_register_user(activation_hash)
if not reg:
logger.error(LOGMSG_ERR_SEC_NO_REGISTER_HASH, activation_hash)
- flash(as_unicode(self.false_error_message), "danger")
+ logger.error("Registration activation failed: %s", self.false_error_message)
Review Comment:
@mistercrunch this is one of the errors that used to be (rightly) surfaced to users, but now might silent in the UI. These (and other?) server-side messages might no longer appear on the frontend.
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2371067474
##########
superset/views/base.py:
##########
@@ -596,7 +591,7 @@ def _delete(self: BaseView, primary_key: int) -> None:
try:
self.pre_delete(item)
except Exception as ex: # pylint: disable=broad-except
- flash(str(ex), "danger")
+ logger.error("Pre-delete error: %s", str(ex))
Review Comment:
### Redundant string conversion in logging <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
Unnecessary string conversion of exception object in logging statement.
###### Why this matters
The `str()` conversion is redundant since Python's logging module automatically converts exception objects to strings when formatting log messages, adding unnecessary overhead.
###### Suggested change ∙ *Feature Preview*
Remove the `str()` wrapper and pass the exception directly to the logger:
```python
logger.error("Pre-delete error: %s", ex)
```
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/3da31ce2-dd76-4c71-8b99-e1708a78860f/upvote) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/3da31ce2-dd76-4c71-8b99-e1708a78860f?what_not_true=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/3da31ce2-dd76-4c71-8b99-e1708a78860f?what_out_of_scope=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/3da31ce2-dd76-4c71-8b99-e1708a78860f?what_not_in_standard=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/3da31ce2-dd76-4c71-8b99-e1708a78860f)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:c251890c-96a5-4c64-8394-6e6dfa5a9078 -->
[](c251890c-96a5-4c64-8394-6e6dfa5a9078)
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2373810210
##########
superset/views/auth.py:
##########
@@ -66,7 +65,7 @@ def activation(self, activation_hash: str) -> WerkzeugResponse:
reg = self.appbuilder.sm.find_register_user(activation_hash)
if not reg:
logger.error(LOGMSG_ERR_SEC_NO_REGISTER_HASH, activation_hash)
- flash(as_unicode(self.false_error_message), "danger")
+ logger.error("Registration activation failed: %s", self.false_error_message)
Review Comment:
Login screen is the only place where this seems to actually work (round-trip + timely flash). Let me refactor this nonsense!
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2374653711
##########
superset/views/core.py:
##########
@@ -428,9 +425,10 @@ def explore( # noqa: C901
_("Error: permalink state not found"), status=404
)
except (ChartNotFoundError, ExplorePermalinkGetFailedError) as ex:
- flash(__("Error: %(msg)s", msg=ex.message), "danger")
Review Comment:
function flagged as @deprecated
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch merged PR #35237:
URL: https://github.com/apache/superset/pull/35237
--
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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2373838227
##########
superset/views/auth.py:
##########
@@ -66,7 +65,7 @@ def activation(self, activation_hash: str) -> WerkzeugResponse:
reg = self.appbuilder.sm.find_register_user(activation_hash)
if not reg:
logger.error(LOGMSG_ERR_SEC_NO_REGISTER_HASH, activation_hash)
- flash(as_unicode(self.false_error_message), "danger")
+ logger.error("Registration activation failed: %s", self.false_error_message)
Review Comment:
Mitigated with a toast, but had to keep the round trip at least for 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] refactor: remove obsolete Flask flash messaging system [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #35237:
URL: https://github.com/apache/superset/pull/35237#discussion_r2373016481
##########
superset/views/auth.py:
##########
@@ -66,7 +65,7 @@ def activation(self, activation_hash: str) -> WerkzeugResponse:
reg = self.appbuilder.sm.find_register_user(activation_hash)
if not reg:
logger.error(LOGMSG_ERR_SEC_NO_REGISTER_HASH, activation_hash)
- flash(as_unicode(self.false_error_message), "danger")
+ logger.error("Registration activation failed: %s", self.false_error_message)
Review Comment:
Relayed: We just need to make sure we have a frontend counterpart for all server side messages that were deleted.
--
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