fix(sqllab): Fall back to empty editor tab when linked query no longer exists#42241
Conversation
Code Review Agent Run #8d2adaActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
The flagged issue is correct. Because the Here is the corrected implementation for describe('popSavedQuery', () => {
const supersetClientGetSpy = jest.spyOn(SupersetClient, 'get');
let store: any;
beforeEach(() => {
store = mockStore(initialState);
});There are no other comments on this PR to address. Would you like me to review any other parts of the code? superset-frontend/src/SqlLab/actions/sqlLab.test.ts |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #42241 +/- ##
==========================================
- Coverage 65.27% 65.25% -0.03%
==========================================
Files 2769 2768 -1
Lines 156339 156201 -138
Branches 35787 35771 -16
==========================================
- Hits 102055 101933 -122
+ Misses 52317 52308 -9
+ Partials 1967 1960 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| describe('popSavedQuery', () => { | ||
| const supersetClientGetSpy = jest.spyOn(SupersetClient, 'get'); | ||
| const store = mockStore({}); | ||
| const store = mockStore(initialState); |
There was a problem hiding this comment.
Only popSavedQuery has an error-path test. the other four (popPermalink, popStoredQuery, popQuery, popDatasourceQuery) get the same fallback but no assertion that addNewQueryEditor fires on failure. could we add coverage for those too, or a shared table-driven case, so the contract is locked for all five?
There was a problem hiding this comment.
Good point, took care of it
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code Review Agent Run #76e2b7Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
…andrusoare/fix/sqllab-delete-tab
Code Review Agent Run #6fd4f3Actionable Suggestions - 0Additional Suggestions - 2
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
When a user opens a SQL Lab link pointing to a deleted resource (
/sqllab/?savedQueryId=<id>, permalink, stored query, query, or datasource), the fetch returns 404 but the UI never exits its loading state — the page is stuck on a skeleton indefinitely.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION