Bug description
With Superset 4.1.1, when I change the source of a dataset, the list of schema is not correct.
I created two databases with different numbers of schemas:
Both databases have schemas with identical names. The "test_schemas_2" database has two additional schemas.
Within both databases, the "schema_a" schemas have the same table. Only the data value changes. I created two connections in Superset.
I created a virtual dataset using: • the schema: test_schemas_1 • the table: schema_a
Finally, a diagram and dashboard were created
Dashboard is OK :
But if I change the source as following :
the diagram is in error :
If I look at the list of proposed schemas for the source again, it is no longer consistent
The last two schemas do not exist on "test_schemas_1"; they are only present on "test_schemas_2" You must force a refresh by changing the database to obtain the correct schemas.
Screenshots/recordings
No response
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.
Comment From: xavier-GitHub76
Version 4.0.2 is OK Version 4.1.1 is KO Version 5.0.0 is KO Version 6.0.0-RC1 is OK
Comment From: dosubot[bot]
Your version comparison matches a known regression: Superset 4.0.2 and 6.0.0-RC1 handle schema list refresh correctly, but 4.1.1 and 5.0.0 sometimes show stale schemas from the previous database until you manually refresh. This was caused by incomplete state reset and cache invalidation in the frontend. The issue was fixed by several pull requests, including #29638, #29681, and #30082, which improved how schema and table lists are updated when switching databases.
If you're on an affected version, you can use the refresh icon next to the schema selector to force a schema list update. Upgrading to 6.0.0-RC1 or later will resolve the bug automatically.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: msyavuz
Does this exist on master? If so that is a regression. Maybe @justinpark might have an idea on how to fix this