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

SQL query option no longer shows up in the + menu #27310

Closed
2 of 3 tasks
sadpandajoe opened this issue Feb 29, 2024 · 2 comments · Fixed by #27361
Closed
2 of 3 tasks

SQL query option no longer shows up in the + menu #27310

sadpandajoe opened this issue Feb 29, 2024 · 2 comments · Fixed by #27361
Assignees

Comments

@sadpandajoe
Copy link
Member

Bug description

With 4.0, it looks like the SQL query option no longer appears in the global + menu. This used to sit below the data section.

How to reproduce the bug

  1. Go to your superset instance with 4.0
  2. Hover over the plus option in the upper right hand corner
  3. Look at all the options

Screenshots/recordings

Screenshot 2024-02-29 at 9 32 18 AM

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@michael-s-molina
Copy link
Member

michael-s-molina commented Feb 29, 2024

@sadpandajoe @dpgaspar @rusackas

#27117 removed the following deprecated endpoint:

@deprecated(new_target="/sqllab")
def sqllab(self) -> FlaskResponse:

Which was registered in Superset's initialization:

appbuilder.add_view_no_menu(SqlLab)

superset init uses the registered views to dynamically generate the permissions, in that case, can_sqllab was generated from that entry and it does not exist anymore in a fresh installation of Superset. Searching for can_sqllab we can still find many references to it in the code base, including the menu item that is missing.

@dpgaspar I think the solution here would be to do a full revision of our permissions given all deprecated endpoints that were removed in 4.0 and update the code to only reference valid permissions. This was hard to spot before because the permissions are dynamically generated.

I'll generate a diff of the automatically created permissions in 3.1 and 4.0 to see which ones were removed.

@michael-s-molina michael-s-molina self-assigned this Feb 29, 2024
@sadpandajoe
Copy link
Member Author

Thanks @michael-s-molina for the investigation on this issue.

cc: @yousoph heads up on this issue

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants