debabsah commented on issue #40850: URL: https://github.com/apache/superset/issues/40850#issuecomment-4820440220
I looked into this since it overlaps with the SQL Lab database-selector area, and the obvious fix (re-adding a filter) may not be the right one. A few findings: - The SQL Lab dropdown's own fetch is already scoped correctly. In SQL Lab mode, `DatabaseSelector` adds an `expose_in_sqllab eq true` filter alongside the name filter (`superset-frontend/src/components/DatabaseSelector/index.tsx`), and the list API allows that filter (`expose_in_sqllab` is in `search_columns` in `superset/databases/api.py`). That block is unchanged between 6.0.0 and 6.1.0. - The SQL Lab bootstrap, however, seeds the store with every database unfiltered: `bootstrap_sqllab_data` iterates `DatabaseDAO.find_all()` with no `expose_in_sqllab` filter (`superset/sqllab/utils.py`). That has been the case since at least 6.0.0, so it is not itself the change, but it does mean the editor starts with hidden databases in state. So this does not look like a removed filter; the unfiltered bootstrap state appears to be getting surfaced in the selector. That state handling is the same area being reworked in #41245 / #41281 (`SET_DATABASES`), so the two are likely related. Happy to reproduce on 6.1.0, bisect 6.0.0 to 6.1.0 to pin the exact change, and open a small PR. Two questions first: 1. Intended behavior: should `expose_in_sqllab = false` databases be fully hidden from SQL Lab, including the bootstrap state, not just the dropdown query? 2. Would you prefer this be coordinated with #41281, since they touch the same path? -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
