Fix long running queries possibly piling up via auto-refresh (#32754)
* Simplify the code that fixes dashboard tab race condition Remove a part of dashboard reducer that addressed the race condition from https://github.com/metabase/metabase/pull/31578/files#r1240203745. I revert the code back to make it simpler and fix the race condition by calling certain actions in the right order. * Update the todo comment to use more standard todo tag * Prevent fetching a dashcard when the previous API isn't done and is auto-refresh * Only skip loading new dashcard on dashcoard auto refresh * fixup! Simplify the code that fixes dashboard tab race condition * Clean up dashboard action Rename an action with misleading name * Make the boolean flag easier to understand * fixup! Make the boolean flag easier to understand * Add E2E * Remove commented out code * Correct `startTime` behavior * Fix the case when navigating between dashboards * Make isRefreshing logic easier to follow * Fix failed unit tests
Showing
- e2e/test/scenarios/dashboard/reproductions/12578-prevent-fetching-slow-cards-more-than-one-at-a-time-when-auto-refreshing.cy.spec.js 44 additions, 0 deletions...s-more-than-one-at-a-time-when-auto-refreshing.cy.spec.js
- frontend/src/metabase-types/store/dashboard.ts 0 additions, 1 deletionfrontend/src/metabase-types/store/dashboard.ts
- frontend/src/metabase-types/store/mocks/dashboard.ts 0 additions, 1 deletionfrontend/src/metabase-types/store/mocks/dashboard.ts
- frontend/src/metabase/dashboard/actions/data-fetching.js 57 additions, 21 deletionsfrontend/src/metabase/dashboard/actions/data-fetching.js
- frontend/src/metabase/dashboard/components/RefreshWidget.jsx 6 additions, 3 deletionsfrontend/src/metabase/dashboard/components/RefreshWidget.jsx
- frontend/src/metabase/dashboard/constants.ts 0 additions, 1 deletionfrontend/src/metabase/dashboard/constants.ts
- frontend/src/metabase/dashboard/hoc/DashboardControls.jsx 1 addition, 0 deletionsfrontend/src/metabase/dashboard/hoc/DashboardControls.jsx
- frontend/src/metabase/dashboard/reducers.js 1 addition, 14 deletionsfrontend/src/metabase/dashboard/reducers.js
- frontend/src/metabase/dashboard/reducers.unit.spec.js 2 additions, 8 deletionsfrontend/src/metabase/dashboard/reducers.unit.spec.js
Loading
Please register or sign in to comment