You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/10/27 12:03:30 UTC
[GitHub] [superset] madsbuch opened a new issue #17245: Reports without a chart cannot be screenshot by celery worker
madsbuch opened a new issue #17245:
URL: https://github.com/apache/superset/issues/17245
Scheduled reporting and alerts use a celery worker. This worker authenticates users and renders a standalone reports page using Selenium and a headless browser. Finally, this is emailed.
It appears that Selenium is set to wait until the class `slice_container` is available (https://github.com/apache/superset/blob/master/superset/utils/webdriver.py#L130-L134). However, it seems like this class is only added to Charts (https://github.com/apache/superset/search?q=slice_container). Th problem occurs when no charts are available on reports.
I know this is an obscure conor case that probably don't merit too much change. However, it took me some time to debug this from the error I got
```
[2021-10-27 11:36:30,019: WARNING/MainProcess] Selenium timed out requesting url http://superset:8088/superset/dashboard/1/?standalone=3
Traceback (most recent call last):
File "/app/superset/utils/webdriver.py", line 134, in get_screenshot
(By.CLASS_NAME, "slice_container")
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Report state: Report Schedule execution failed when generating a screenshot.
```
#### How to reproduce the bug
1. Create a dashboard without a chart
2. Setup a scheduled report
3. See that above-mentioned error is thrown
### Expected results
To have the report screenshot and send
### Actual results
Selenium times out.
### Environment
(please complete the following information):
- browser type and version: GECKODRIVER_VERSION=0.29.0
- superset version: `apache/superset:1.3.0`, from dockerhub
- python version: As bundled in the docker image
- node.js version: As bundled in the docker image
- any feature flags active: `FEATURE_FLAGS = {"ALERT_REPORTS": True}`
### Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [x] I have reproduced the issue with at least the latest released version of superset.
- [x] I have checked the issue tracker for the same issue and I haven't found one similar.
### Additional context
Knowing when the page is rendered is a hard one. It might also be documentation or more verbose error handling that is the solution.
Let me know how to best contribute a solution to this, if that is an option.
--
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
[GitHub] [superset] ensky commented on issue #17245: Reports without a chart cannot be screenshot by celery worker
Posted by GitBox <gi...@apache.org>.
ensky commented on issue #17245:
URL: https://github.com/apache/superset/issues/17245#issuecomment-985310116
> it would be interesting to hear about the use case to understand this need better (=dashboard without regular charts)
We faced the same problem by trying to add an alert to a dashboard with a pure markdown document. In our scenario, this dashboard is a "help" about how to use the superset. Obviously it is not a good choice to send an alert on this "help", however unfortunately it happend to be the dashboard I used to test whether the alert system is working ;(. It took me an afternoon to figure out the problem, and had a same conclusion with @madsbuch :D
--
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
[GitHub] [superset] villebro commented on issue #17245: Reports without a chart cannot be screenshot by celery worker
Posted by GitBox <gi...@apache.org>.
villebro commented on issue #17245:
URL: https://github.com/apache/superset/issues/17245#issuecomment-954513316
@madsbuch this is indeed an unfortunate fringe case. I agree with your assessment, and you seem to have pinpointed the piece of code that would need to be modified to handle this specific case (potentially we might need to add/change some class names on the frontend components). Would you be open to taking this task on in the form of a PR? I would be happy to assist. Also, it would be interesting to hear about the use case to understand this need better (=dashboard without regular charts).
--
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