Skip to content

expose_in_sqllab flag ignored in SQL Lab database selector (6.1.0 regression) #40850

Description

@JhonMcLovin

Bug description

After upgrading from Superset 6.0.0 to 6.1.0, SQL Lab displays databases where expose_in_sqllab = false.

Previously (6.0.0), these databases were correctly hidden from the SQL Lab dropdown, but in 6.1.0 they are shown regardless of the flag.

This breaks setups that rely on dual database configurations (separate DBs for Explore vs SQL Lab).

Screenshots/recordings

  1. Create a database with:
    expose_in_sqllab = false

  2. Create another database with:
    expose_in_sqllab = true

  3. Ensure user has access to a dataset that uses the hidden DB

  4. Open SQL Lab

  5. Observe both databases appear in dropdown

Superset version

master / latest-dev

Python version

3.9

Node version

I don't know

Browser

Chrome

Additional context

Expected behavior
Databases with expose_in_sqllab = false should NOT appear in SQL Lab database selector.
Actual behavior
Databases appear in SQL Lab dropdown even when:

  • expose_in_sqllab = false
  • correctly stored in metadata DB
    Additional context
  • API /api/v1/database returns entries with expose_in_sqllab=false
  • SQL Lab frontend does not filter them out
  • Role-based filtering is working correctly, but expose_in_sqllab is ignored

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    #bug:regressionBugs that are identified as regessionsapiRelated to the REST APIsqllabNamespace | Anything related to the SQL Lab

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions