Vitor-Avila commented on code in PR #44992:
URL: https://github.com/apache/superset/pull/44992#discussion_r4213973855
##########
superset/commands/report/execute.py:
##########
@@ -2571,22 +2678,10 @@ def run(self) -> None: # noqa: C901
deadline.remaining_seconds,
)
- # Resolve the executor at the run() boundary, tolerating a missing
- # user (find_user -> None) so the state machine still runs and its
- # error envelope writes the ERROR execution-log row and sends the
- # editor notification. The dedicated
ReportScheduleExecutorNotFoundError
- # guard lives at the content sites (_get_screenshots / _get_data /
- # _get_embedded_data), which raise inside that envelope. Guarding
here
- # instead would surface the executor error above the state machine,
- # suppressing both the log row and the editor notification. The
- # alert-query path (AlertCommand) is intentionally left unchanged
— a
- # missing executor there surfaces as a query error, not the
dedicated
- # executor error; tightening it is out of scope here.
- _, username = get_executor(
- executors=app.config["ALERT_REPORTS_EXECUTORS"],
- model=self._model,
- )
- user = security_manager.find_user(username)
+ # Resolve content identity without rejecting an attachment-free
alert.
+ # Content fetches and AlertCommand validate their respective
identities
+ # inside the state machine, where failures are logged and
terminalized.
+ user, username = get_executor_user(self._model)
Review Comment:
Will work on address this.
##########
superset/commands/report/execute.py:
##########
@@ -672,6 +722,12 @@ def _get_url(
# _get_embedded_data, _get_notification_content) funnels through this
# method, so this is the single choke point.
if chart is None and dashboard is None:
+ if (
+ user_friendly
+ and self._report_schedule.type == ReportScheduleType.ALERT
+ and not self._attachments_enabled()
+ ):
+ return ""
Review Comment:
This one as well
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]