Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save as dashboard with duplicating charts is not working after 1.4.0 upgrade #18220

Closed
iercan opened this issue Jan 28, 2022 · 9 comments
Closed
Labels
#bug Bug report validation:required A committer should validate the issue

Comments

@iercan
Copy link
Contributor

iercan commented Jan 28, 2022

After upgrading to 1.4.0 we are not able to save as a dashboard with duplicate chart option. This is the error shown in the logs. It gives the same error on all dashboards I tried.

superset_1 | 'NoneType' object has no attribute 'roles'
superset_1 | Traceback (most recent call last):
superset_1 | File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
superset_1 | rv = self.dispatch_request()
superset_1 | File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
superset_1 | return self.view_functionsrule.endpoint
superset_1 | File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py", line 148, in wraps
superset_1 | return f(self, *args, **kwargs)
superset_1 | File "/app/superset/utils/log.py", line 240, in wrapper
superset_1 | value = f(*args, add_extra_log_payload=log, **kwargs)
superset_1 | File "/app/superset/utils/decorators.py", line 104, in wrapper
superset_1 | raise exception
superset_1 | File "/app/superset/utils/decorators.py", line 100, in wrapper
superset_1 | current_app.appbuilder.sm.raise_for_dashboard_access(dashboard)
superset_1 | File "/app/superset/security/manager.py", line 1180, in raise_for_dashboard_access
superset_1 | for dashboard_role in dashboard.roles
superset_1 | AttributeError: 'NoneType' object has no attribute 'roles'
superset_1 | 2022-01-28 21:10:43,139:ERROR:superset.views.base:'NoneType' object has no attribute 'roles'
superset_1 | Traceback (most recent call last):
superset_1 | File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
superset_1 | rv = self.dispatch_request()
superset_1 | File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
superset_1 | return self.view_functionsrule.endpoint
superset_1 | File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py", line 148, in wraps
superset_1 | return f(self, *args, **kwargs)
superset_1 | File "/app/superset/utils/log.py", line 240, in wrapper
superset_1 | value = f(*args, add_extra_log_payload=log, **kwargs)
superset_1 | File "/app/superset/utils/decorators.py", line 104, in wrapper
superset_1 | raise exception
superset_1 | File "/app/superset/utils/decorators.py", line 100, in wrapper
superset_1 | current_app.appbuilder.sm.raise_for_dashboard_access(dashboard)
superset_1 | File "/app/superset/security/manager.py", line 1180, in raise_for_dashboard_access
superset_1 | for dashboard_role in dashboard.roles
superset_1 | AttributeError: 'NoneType' object has no attribute 'roles'

How to reproduce the bug

  1. Open a dashboard
  2. Click save as option
  3. Choose duplicate charts and save

Expected results

New dashboard should be created by duplicating charts

Actual results

Process fails

Environment

(please complete the following information):

  • browser type and version: chrome 97
  • superset version: 1.4.0 deployed with official image
@iercan iercan added the #bug Bug report label Jan 28, 2022
@iercan iercan changed the title Save as dashboard with duplicating chats is not working after 1.4.0 upgrade Save as dashboard with duplicating charts is not working after 1.4.0 upgrade Jan 28, 2022
@rumbin
Copy link
Contributor

rumbin commented Feb 1, 2022

Confirming this for our deployment.

@rumbin
Copy link
Contributor

rumbin commented Feb 1, 2022

image

@geido geido added the validation:required A committer should validate the issue label Feb 1, 2022
@geido
Copy link
Member

geido commented Feb 1, 2022

I cannot reproduce on master

@iercan
Copy link
Contributor Author

iercan commented Feb 1, 2022

@geido Can you try it with dashboard_rbac feature flag enabled. I suspect it is related with it.

@rumbin
Copy link
Contributor

rumbin commented Feb 1, 2022

We don't have dashboard_rbac enabled and still have the issue on v. 1.4.0

@rumbin
Copy link
Contributor

rumbin commented Feb 1, 2022

I just tested it with 1.4.0 Docker image with all FEATURE_FLAGS unaltered, i.e., with only the defalut feature flags activated:
The issue is still present.

@rumbin
Copy link
Contributor

rumbin commented Feb 1, 2022

If @geido cannot reproduce on master, it seems that there might a solution that could be cherry-picked from it?!

@iercan
Copy link
Contributor Author

iercan commented Feb 14, 2022

I've tested it on 1.4.1. Problem seems resolved.

@PowerDinosaur
Copy link

PowerDinosaur commented Aug 9, 2023

I'm having kinda the same issue on 2.1.0:
I duplicate a dashboard with charts and after that I edit the dashboard (delete some charts) and I cant save it with the same error message. However I can save it with another name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report validation:required A committer should validate the issue
Projects
None yet
Development

No branches or pull requests

4 participants