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

Admins can't create queries on Metabase Analytics models #43088

Open
luizarakaki opened this issue May 23, 2024 · 1 comment
Open

Admins can't create queries on Metabase Analytics models #43088

luizarakaki opened this issue May 23, 2024 · 1 comment
Assignees
Labels
.Frontend Priority:P2 Average run of the mill bug Querying/GUI Query builder catch-all, including simple mode Querying/MBQL .Team/QueryingComponents Type:Bug Product defects

Comments

@luizarakaki
Copy link
Contributor

Describe the bug

Following a specific path, admins can't create questions on Metabase Analytics models.

The reproduction is inconsistent, but we have a customer that can't create questions at all.

To Reproduce

  1. New
  2. Select a Metabase Analytics model
  3. See a locked notebook editor

Repro Loom: https://metaboat.slack.com/archives/C064EB1UE5P/p1716475760677229

Expected behavior

Admins (and any user with view access to the model) should be able to create questions

Logs

No response

Information about your Metabase installation

- Stats

Severity

A high priority P2

Additional context

No response

@luizarakaki luizarakaki added Type:Bug Product defects Priority:P2 Average run of the mill bug Administration/Metabase analytics Pro and Enterprise meta analytics, fka audit labels May 23, 2024
@noahmoss noahmoss self-assigned this May 30, 2024
@noahmoss
Copy link
Member

Root cause: because we don't return the audit DB by default in GET /api/databases, the metadata provider on the FE doesn't have knowledge of it. This results in the MLv2 query having a null database ID, which breaks the logic for displaying the notebook editor.

Returning the audit DB in GET /api/databases fixes this issue, but leads to audit content showing up elsewhere (i.e. it allows the raw audit views to be selected as data sources). We'll probably need some magic to add the audit DB metadata in the right spot on the FE.

Debugging thread for context: https://metaboat.slack.com/archives/C064EB1UE5P/p1717094345309169

@ranquild ranquild self-assigned this May 31, 2024
@ranquild ranquild added Querying/MBQL Querying/GUI Query builder catch-all, including simple mode and removed Administration/Metabase analytics Pro and Enterprise meta analytics, fka audit labels May 31, 2024
@noahmoss noahmoss removed their assignment Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Frontend Priority:P2 Average run of the mill bug Querying/GUI Query builder catch-all, including simple mode Querying/MBQL .Team/QueryingComponents Type:Bug Product defects
Projects
None yet
Development

No branches or pull requests

3 participants