You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2024/02/05 16:46:04 UTC

(superset) branch sc-76937 updated (cf22e61512 -> 332abc7f72)

This is an automated email from the ASF dual-hosted git repository.

beto pushed a change to branch sc-76937
in repository https://gitbox.apache.org/repos/asf/superset.git


 discard cf22e61512 fix: safer error message in alerts
     new 332abc7f72 fix: safer error message in alerts

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (cf22e61512)
            \
             N -- N -- N   refs/heads/sc-76937 (332abc7f72)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 superset/commands/report/alert.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


(superset) 01/01: fix: safer error message in alerts

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch sc-76937
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 332abc7f72ad49717b259e504480cebdfb67b8b8
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Fri Feb 2 14:18:45 2024 -0500

    fix: safer error message in alerts
---
 superset/commands/report/alert.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/superset/commands/report/alert.py b/superset/commands/report/alert.py
index 68013a2c00..1edb362b84 100644
--- a/superset/commands/report/alert.py
+++ b/superset/commands/report/alert.py
@@ -150,7 +150,7 @@ class AlertCommand(BaseCommand):
                 rendered_sql, ALERT_SQL_LIMIT
             )
 
-            _, username = get_executor(
+            executor, username = get_executor(
                 executor_types=app.config["ALERT_REPORTS_EXECUTE_AS"],
                 model=self._report_schedule,
             )
@@ -169,7 +169,12 @@ class AlertCommand(BaseCommand):
             logger.warning("A timeout occurred while executing the alert query: %s", ex)
             raise AlertQueryTimeout() from ex
         except Exception as ex:
-            raise AlertQueryError(message=str(ex)) from ex
+            logger.exception("An error occurred when running alert query")
+            # The exception message here can reveal to much information to malicious
+            # users, so we raise a generic message.
+            raise AlertQueryError(
+                message=_("An error occurred when running alert query")
+            ) from ex
 
     def validate(self) -> None:
         """