ericandrewmeadows opened a new issue #8784: _get_slice_data fails to send slice data when Celery Workers are on another instance URL: https://github.com/apache/incubator-superset/issues/8784 `_get_slice_data` is relying on logging the user in on the main instance of Superset, not the workers. Because `login_user(user)` is being called on the worker. When the instance serving up assets, Gunicorn, is not running on the Celery workers, this will fail to get content because it has not been authenticated. ### Expected results Login should be handled by Gunicorn, and thus set the cookies required for authentication, not the Celery worker itself. ### Actual results Authentication is denied, and the worker is unable to get slice data, whereas getting slice visualization works properly. ``` Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 385, in trace_task R = retval = fun(*args, **kwargs) File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 648, in __protected_call__ return self.run(*args, **kwargs) File "/home/superset/superset/tasks/schedules.py", line 367, in schedule_email_report deliver_slice(schedule) File "/home/superset/superset/tasks/schedules.py", line 334, in deliver_slice email = _get_slice_data(schedule) File "/home/superset/superset/tasks/schedules.py", line 267, in _get_slice_data rows = [r.split(b",") for r in response.content.splitlines()] AttributeError: 'HTTPResponse' object has no attribute 'content' ``` #### Screenshots If applicable, add screenshots to help explain your problem. #### How to reproduce the bug 0. Have Celery workers startup running separately from the Gunicorn instance hosting the Flask app. 1. Setup a slice to send slice data, inline or as an attachment 2. Send Test report 3. See the failure. ### Environment (please complete the following information): - superset version: `0.34.0rc2` - python version: `3.7` - node.js version: `N/A` - npm version: `N/A` ### Checklist Make sure these boxes are checked 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. - [ ] I have reproduced the issue with at least the latest released version of superset. - [ ] I have checked the issue tracker for the same issue and I haven't found one similar. ### Additional context Add any other context about the problem here.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
