eschutho commented on code in PR #35591:
URL: https://github.com/apache/superset/pull/35591#discussion_r2418206900
##########
superset/commands/report/execute.py:
##########
@@ -419,7 +419,19 @@ def _get_csv_data(self) -> bytes:
logger.info("Getting chart from %s as user %s", url, user.username)
csv_data = get_chart_csv_data(chart_url=url,
auth_cookies=auth_cookies)
except SoftTimeLimitExceeded as ex:
- raise ReportScheduleCsvTimeout() from ex
+ chart_id = self._report_schedule.chart_id
+ chart_name = self._report_schedule.chart.slice_name
+ timeout = self._report_schedule.working_timeout or app.config.get(
+ "ALERT_REPORTS_DEFAULT_WORKING_TIMEOUT", 3600
+ )
+ error_msg = (
+ f"Timeout fetching CSV data for chart '{chart_name}' "
+ f"(ID: {chart_id}). The chart query exceeded the {timeout} "
+ f"second timeout limit. Consider optimizing the chart query "
+ f"or increasing the working timeout."
+ )
+ logger.error(error_msg)
Review Comment:
probably don't need to explicitly log to stderr here, as the raise below
should take care of it.
--
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]