You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "bikash-barnwal (via GitHub)" <gi...@apache.org> on 2026/08/15 08:44:04 UTC
[PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
bikash-barnwal opened a new pull request, #43215:
URL: https://github.com/apache/superset/pull/43215
### SUMMARY
`React.lazy` memoizes its factory's **rejection**, not just its resolution. Once the dynamic `import()` behind a route fails β a chunk that 404s after a redeploy, or a transient 502/503 from the asset server β the payload is permanently marked rejected. The component then throws `ChunkLoadError` forever: navigating away and back re-renders the same rejected payload, and only a full page reload clears it.
Retrying *inside* the factory, before the promise handed to `React.lazy` settles, is the only way to recover, since nothing outside can reset that memoized state.
This adds `lazyWithRetry`, a drop-in replacement that retries with exponential backoff (2 extra attempts, 500 ms doubling) and rejects with the last error once exhausted, and switches the lazily loaded routes and entry points to it: `views/routes.tsx`, `embedded/index.tsx`, `dashboard/containers/DashboardPage.tsx`, `dashboard/components/DashboardBuilder/DashboardBuilder.tsx`, `explore/components/ExploreViewContainer/index.tsx`.
**What this does and doesn't fix**, since #41266 carries `validation:required` and the report doesn't say which case it hit: a *transient* failure now recovers on its own. A chunk that is permanently gone β an old hashed filename after a redeploy while the client still holds the previous index β still fails once the retries are exhausted, which is the correct outcome; recovering from that needs a reload-on-stale-manifest strategy, which is a larger change and not attempted here.
The component constraint is lifted from `React.lazy`'s own signature (`Parameters<typeof lazy>[0]`) so call sites keep their prop types without this module spelling out an `any`.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: one failed chunk request leaves the route permanently broken until the user reloads.
After: the import is retried twice with backoff; a transient failure is invisible to the user.
### TESTING INSTRUCTIONS
```bash
cd superset-frontend
npm run test -- src/utils/lazyWithRetry.test.tsx
npm run test -- src/views/routes src/dashboard/containers
```
3 new tests: recovering from a transient `ChunkLoadError`, exhausting attempts and rethrowing the last error, and not retrying a successful import. 16 tests across the affected route/container suites still pass. oxlint and oxfmt clean.
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #41266
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
π€ Generated with [Claude Code](https://claude.com/claude-code)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #43215:
URL: https://github.com/apache/superset/pull/43215#discussion_r3976499973
##########
superset-frontend/src/views/routes.tsx:
##########
@@ -32,161 +28,161 @@ import { RoutePaths } from './routePaths';
// not lazy loaded since this is the home page.
import Home from 'src/pages/Home';
-const ChartCreation = lazy(
+const ChartCreation = lazyWithRetry(
() =>
import(/* webpackChunkName: "ChartCreation" */ 'src/pages/ChartCreation'),
);
-const AnnotationLayerList = lazy(
+const AnnotationLayerList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "AnnotationLayerList" */ 'src/pages/AnnotationLayerList'
),
);
-const AlertReportList = lazy(
+const AlertReportList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "AlertReportList" */ 'src/pages/AlertReportList'
),
);
-const AnnotationList = lazy(
+const AnnotationList = lazyWithRetry(
() =>
import(/* webpackChunkName: "AnnotationList" */ 'src/pages/AnnotationList'),
);
-const ChartList = lazy(
+const ChartList = lazyWithRetry(
() => import(/* webpackChunkName: "ChartList" */ 'src/pages/ChartList'),
);
-const ArchivedList = lazy(
+const ArchivedList = lazyWithRetry(
() => import(/* webpackChunkName: "ArchivedList" */ 'src/pages/ArchivedList'),
);
-const CssTemplateList = lazy(
+const CssTemplateList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "CssTemplateList" */ 'src/pages/CssTemplateList'
),
);
-const ThemeList = lazy(
+const ThemeList = lazyWithRetry(
() => import(/* webpackChunkName: "ThemeList" */ 'src/pages/ThemeList'),
);
-const DashboardList = lazy(
+const DashboardList = lazyWithRetry(
() =>
import(/* webpackChunkName: "DashboardList" */ 'src/pages/DashboardList'),
);
-const Dashboard = lazy(
+const Dashboard = lazyWithRetry(
() => import(/* webpackChunkName: "Dashboard" */ 'src/pages/Dashboard'),
);
-const DatabaseList = lazy(
+const DatabaseList = lazyWithRetry(
() => import(/* webpackChunkName: "DatabaseList" */ 'src/pages/DatabaseList'),
);
-const DatasetList = lazy(
+const DatasetList = lazyWithRetry(
() => import(/* webpackChunkName: "DatasetList" */ 'src/pages/DatasetList'),
);
-const DatasetCreation = lazy(
+const DatasetCreation = lazyWithRetry(
() =>
import(
/* webpackChunkName: "DatasetCreation" */ 'src/pages/DatasetCreation'
),
);
-const ExecutionLogList = lazy(
+const ExecutionLogList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "ExecutionLogList" */ 'src/pages/ExecutionLogList'
),
);
-const Chart = lazy(
+const Chart = lazyWithRetry(
() => import(/* webpackChunkName: "Chart" */ 'src/pages/Chart'),
);
-const QueryHistoryList = lazy(
+const QueryHistoryList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "QueryHistoryList" */ 'src/pages/QueryHistoryList'
),
);
-const SavedQueryList = lazy(
+const SavedQueryList = lazyWithRetry(
() =>
import(/* webpackChunkName: "SavedQueryList" */ 'src/pages/SavedQueryList'),
);
-const SqlLab = lazy(
+const SqlLab = lazyWithRetry(
() => import(/* webpackChunkName: "SqlLab" */ 'src/pages/SqlLab'),
);
-const AllEntities = lazy(
+const AllEntities = lazyWithRetry(
() => import(/* webpackChunkName: "AllEntities" */ 'src/pages/AllEntities'),
);
-const Tags = lazy(
+const Tags = lazyWithRetry(
() => import(/* webpackChunkName: "Tags" */ 'src/pages/Tags'),
);
-const Extensions = lazy(
+const Extensions = lazyWithRetry(
() => import(/* webpackChunkName: "Tags" */ 'src/extensions/ExtensionsList'),
Review Comment:
<!-- Bito Reply -->
The update to the webpack chunk name for the Extensions route is appropriate. It resolves the duplicate chunk name issue identified in the review, ensuring that the Extensions module is correctly isolated from the Tags module for better cache management.
**superset-frontend/src/views/routes.tsx**
```
-const Extensions = lazy(
+const Extensions = lazyWithRetry(
- () => import(/* webpackChunkName: "Tags" */ 'src/extensions/ExtensionsList'),
+ () => import(/* webpackChunkName: "Extensions" */ 'src/extensions/ExtensionsList'),
```
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-6150193928
## CodeAnt PR Risk: Low Risk
- The PR appears safe to merge.
- Lazy-loaded pages now retry recognized chunk-load failures while surfacing deterministic import errors immediately.
- Tests cover successful imports, transient failures, exhausted retries, and non-retryable errors.
**Assessed commit:** `227316fdf83c`
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-5301472368
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/43215?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 66.65%. Comparing base ([`69c4011`](https://app.codecov.io/gh/apache/superset/commit/69c4011a95a5d2fbdbb5d360b188c313be06e17d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`a0a317e`](https://app.codecov.io/gh/apache/superset/commit/a0a317ef2e7286df49592f1155a7e48eb180f491?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 10 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #43215 +/- ##
=======================================
Coverage 66.65% 66.65%
=======================================
Files 2873 2874 +1
Lines 163654 163672 +18
Branches 37771 37775 +4
=======================================
+ Hits 109090 109102 +12
- Misses 52434 52440 +6
Partials 2130 2130
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/43215/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Ξ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/43215/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.77% <100.00%> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/43215?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #43215:
URL: https://github.com/apache/superset/pull/43215#discussion_r3788991510
##########
superset-frontend/src/views/routes.tsx:
##########
@@ -32,161 +28,161 @@ import { RoutePaths } from './routePaths';
// not lazy loaded since this is the home page.
import Home from 'src/pages/Home';
-const ChartCreation = lazy(
+const ChartCreation = lazyWithRetry(
() =>
import(/* webpackChunkName: "ChartCreation" */ 'src/pages/ChartCreation'),
);
-const AnnotationLayerList = lazy(
+const AnnotationLayerList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "AnnotationLayerList" */ 'src/pages/AnnotationLayerList'
),
);
-const AlertReportList = lazy(
+const AlertReportList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "AlertReportList" */ 'src/pages/AlertReportList'
),
);
-const AnnotationList = lazy(
+const AnnotationList = lazyWithRetry(
() =>
import(/* webpackChunkName: "AnnotationList" */ 'src/pages/AnnotationList'),
);
-const ChartList = lazy(
+const ChartList = lazyWithRetry(
() => import(/* webpackChunkName: "ChartList" */ 'src/pages/ChartList'),
);
-const ArchivedList = lazy(
+const ArchivedList = lazyWithRetry(
() => import(/* webpackChunkName: "ArchivedList" */ 'src/pages/ArchivedList'),
);
-const CssTemplateList = lazy(
+const CssTemplateList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "CssTemplateList" */ 'src/pages/CssTemplateList'
),
);
-const ThemeList = lazy(
+const ThemeList = lazyWithRetry(
() => import(/* webpackChunkName: "ThemeList" */ 'src/pages/ThemeList'),
);
-const DashboardList = lazy(
+const DashboardList = lazyWithRetry(
() =>
import(/* webpackChunkName: "DashboardList" */ 'src/pages/DashboardList'),
);
-const Dashboard = lazy(
+const Dashboard = lazyWithRetry(
() => import(/* webpackChunkName: "Dashboard" */ 'src/pages/Dashboard'),
);
-const DatabaseList = lazy(
+const DatabaseList = lazyWithRetry(
() => import(/* webpackChunkName: "DatabaseList" */ 'src/pages/DatabaseList'),
);
-const DatasetList = lazy(
+const DatasetList = lazyWithRetry(
() => import(/* webpackChunkName: "DatasetList" */ 'src/pages/DatasetList'),
);
-const DatasetCreation = lazy(
+const DatasetCreation = lazyWithRetry(
() =>
import(
/* webpackChunkName: "DatasetCreation" */ 'src/pages/DatasetCreation'
),
);
-const ExecutionLogList = lazy(
+const ExecutionLogList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "ExecutionLogList" */ 'src/pages/ExecutionLogList'
),
);
-const Chart = lazy(
+const Chart = lazyWithRetry(
() => import(/* webpackChunkName: "Chart" */ 'src/pages/Chart'),
);
-const QueryHistoryList = lazy(
+const QueryHistoryList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "QueryHistoryList" */ 'src/pages/QueryHistoryList'
),
);
-const SavedQueryList = lazy(
+const SavedQueryList = lazyWithRetry(
() =>
import(/* webpackChunkName: "SavedQueryList" */ 'src/pages/SavedQueryList'),
);
-const SqlLab = lazy(
+const SqlLab = lazyWithRetry(
() => import(/* webpackChunkName: "SqlLab" */ 'src/pages/SqlLab'),
);
-const AllEntities = lazy(
+const AllEntities = lazyWithRetry(
() => import(/* webpackChunkName: "AllEntities" */ 'src/pages/AllEntities'),
);
-const Tags = lazy(
+const Tags = lazyWithRetry(
() => import(/* webpackChunkName: "Tags" */ 'src/pages/Tags'),
);
-const Extensions = lazy(
+const Extensions = lazyWithRetry(
() => import(/* webpackChunkName: "Tags" */ 'src/extensions/ExtensionsList'),
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Duplicate webpack chunk name</b></div>
<div id="fix">
The `Extensions` route at line 134 uses `webpackChunkName: "Tags"`, which is already assigned to the `Tags` page at line 130. These are separate modules (`src/pages/Tags` vs `src/extensions/ExtensionsList`) that should not share a chunk name. Duplicate chunk names cause webpack to group unrelated modules together, leading to unnecessary cache invalidation when only one module changes.
</div>
</div>
<small><i>Code Review Run #dc4682</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-5614694691
### <span aria-hidden="true">β
</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">π¨</span> Latest commit | f06c0a79f5050fe51df812428366a975af2c32cc |
|<span aria-hidden="true">π</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6aa2591f10196d00082b2525 |
|<span aria-hidden="true">π</span> Deploy Preview | [https://deploy-preview-43215--superset-docs-preview.netlify.app](https://deploy-preview-43215--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">π±</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">π€</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#q1YqKMrPLShRslJS0lFKKkrMS84AstMyK_RzEqsqdZMzSvOydYtSS4oqgfIpqQU5-ZWeKUAVZomJRqaWhmmGBoaWZikGBgYWRklGpkamSrUA) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-43215--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #43215:
URL: https://github.com/apache/superset/pull/43215#discussion_r4332318302
##########
superset-frontend/src/utils/lazyWithRetry.ts:
##########
@@ -0,0 +1,120 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { LazyExoticComponent, lazy } from 'react';
+
+/**
+ * `React.lazy` memoizes the *rejection* of its factory: once the dynamic
+ * `import()` behind a route fails (a chunk that 404s after a redeploy, or a
+ * transient 502/503 from the asset server), the payload is permanently marked
+ * as rejected and the component throws `ChunkLoadError` forever - even after
+ * the asset becomes reachable again and even when the user navigates away and
+ * back. Retrying the import *inside* the factory, before the promise handed to
+ * `React.lazy` settles, is the only way to recover from a transient failure.
+ *
+ * See https://github.com/apache/superset/issues/41266
+ */
+export const DEFAULT_LAZY_RETRIES = 2;
+export const DEFAULT_LAZY_RETRY_DELAY_MS = 500;
+
+export interface LazyRetryOptions {
+ /** Number of *additional* attempts made after the first one fails. */
+ retries?: number;
+ /** Base delay between attempts; doubled on every subsequent attempt. */
+ retryDelayMs?: number;
+ /**
+ * Predicate deciding whether an error is worth retrying. Defaults to
+ * `isChunkLoadError` so deterministic failures (syntax errors, missing
+ * dependencies, module-evaluation errors) surface immediately instead of
+ * being retried.
+ */
+ isRetryable?: (error: unknown) => boolean;
+}
+
+/**
+ * Recognizes the transient "chunk failed to load" errors browsers/bundlers
+ * raise on a stale or momentarily-unreachable asset, as opposed to
+ * deterministic module errors (syntax errors, missing dependencies) that
+ * will fail identically on every retry.
+ */
+export const isChunkLoadError = (error: unknown): boolean =>
+ error instanceof Error &&
+ (error.name === 'ChunkLoadError' ||
+ /loading chunk|failed to fetch dynamically imported module/i.test(
+ error.message,
+ ));
+
+const sleep = (ms: number): Promise<void> =>
+ new Promise(resolve => {
+ setTimeout(resolve, ms);
+ });
+
+/**
+ * Calls `factory`, retrying with exponential backoff when it rejects with a
+ * retryable error. Rejects with the last error once every attempt has been
+ * exhausted, or immediately when the error is not retryable.
+ */
+export async function retryImport<T>(
+ factory: () => Promise<T>,
+ {
+ retries = DEFAULT_LAZY_RETRIES,
+ retryDelayMs = DEFAULT_LAZY_RETRY_DELAY_MS,
+ isRetryable = isChunkLoadError,
+ }: LazyRetryOptions = {},
+): Promise<T> {
+ let lastError: unknown;
+ for (let attempt = 0; attempt <= retries; attempt += 1) {
+ try {
+ // eslint-disable-next-line no-await-in-loop
+ return await factory();
+ } catch (error) {
+ lastError = error;
+ if (attempt < retries && isRetryable(error)) {
+ // eslint-disable-next-line no-await-in-loop
+ await sleep(retryDelayMs * 2 ** attempt);
Review Comment:
Done, this uses full jitter now: each attempt sleeps a random `[0, retryDelayMs * 2 ** attempt)` so a burst of clients stops lining up on the same offsets. There is a test pinning `Math.random` to keep it that way, too.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #43215:
URL: https://github.com/apache/superset/pull/43215
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-5766731339
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers an incremental AI Review.
- `/review full` - Manually triggers a full AI Review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #43215:
URL: https://github.com/apache/superset/pull/43215#discussion_r3976498705
##########
superset-frontend/src/views/routes.tsx:
##########
@@ -32,161 +28,161 @@ import { RoutePaths } from './routePaths';
// not lazy loaded since this is the home page.
import Home from 'src/pages/Home';
-const ChartCreation = lazy(
+const ChartCreation = lazyWithRetry(
() =>
import(/* webpackChunkName: "ChartCreation" */ 'src/pages/ChartCreation'),
);
-const AnnotationLayerList = lazy(
+const AnnotationLayerList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "AnnotationLayerList" */ 'src/pages/AnnotationLayerList'
),
);
-const AlertReportList = lazy(
+const AlertReportList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "AlertReportList" */ 'src/pages/AlertReportList'
),
);
-const AnnotationList = lazy(
+const AnnotationList = lazyWithRetry(
() =>
import(/* webpackChunkName: "AnnotationList" */ 'src/pages/AnnotationList'),
);
-const ChartList = lazy(
+const ChartList = lazyWithRetry(
() => import(/* webpackChunkName: "ChartList" */ 'src/pages/ChartList'),
);
-const ArchivedList = lazy(
+const ArchivedList = lazyWithRetry(
() => import(/* webpackChunkName: "ArchivedList" */ 'src/pages/ArchivedList'),
);
-const CssTemplateList = lazy(
+const CssTemplateList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "CssTemplateList" */ 'src/pages/CssTemplateList'
),
);
-const ThemeList = lazy(
+const ThemeList = lazyWithRetry(
() => import(/* webpackChunkName: "ThemeList" */ 'src/pages/ThemeList'),
);
-const DashboardList = lazy(
+const DashboardList = lazyWithRetry(
() =>
import(/* webpackChunkName: "DashboardList" */ 'src/pages/DashboardList'),
);
-const Dashboard = lazy(
+const Dashboard = lazyWithRetry(
() => import(/* webpackChunkName: "Dashboard" */ 'src/pages/Dashboard'),
);
-const DatabaseList = lazy(
+const DatabaseList = lazyWithRetry(
() => import(/* webpackChunkName: "DatabaseList" */ 'src/pages/DatabaseList'),
);
-const DatasetList = lazy(
+const DatasetList = lazyWithRetry(
() => import(/* webpackChunkName: "DatasetList" */ 'src/pages/DatasetList'),
);
-const DatasetCreation = lazy(
+const DatasetCreation = lazyWithRetry(
() =>
import(
/* webpackChunkName: "DatasetCreation" */ 'src/pages/DatasetCreation'
),
);
-const ExecutionLogList = lazy(
+const ExecutionLogList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "ExecutionLogList" */ 'src/pages/ExecutionLogList'
),
);
-const Chart = lazy(
+const Chart = lazyWithRetry(
() => import(/* webpackChunkName: "Chart" */ 'src/pages/Chart'),
);
-const QueryHistoryList = lazy(
+const QueryHistoryList = lazyWithRetry(
() =>
import(
/* webpackChunkName: "QueryHistoryList" */ 'src/pages/QueryHistoryList'
),
);
-const SavedQueryList = lazy(
+const SavedQueryList = lazyWithRetry(
() =>
import(/* webpackChunkName: "SavedQueryList" */ 'src/pages/SavedQueryList'),
);
-const SqlLab = lazy(
+const SqlLab = lazyWithRetry(
() => import(/* webpackChunkName: "SqlLab" */ 'src/pages/SqlLab'),
);
-const AllEntities = lazy(
+const AllEntities = lazyWithRetry(
() => import(/* webpackChunkName: "AllEntities" */ 'src/pages/AllEntities'),
);
-const Tags = lazy(
+const Tags = lazyWithRetry(
() => import(/* webpackChunkName: "Tags" */ 'src/pages/Tags'),
);
-const Extensions = lazy(
+const Extensions = lazyWithRetry(
() => import(/* webpackChunkName: "Tags" */ 'src/extensions/ExtensionsList'),
Review Comment:
Good catch, fixed. Gave `Extensions` its own `webpackChunkName` instead of reusing `Tags`'s.
##########
superset-frontend/src/utils/lazyWithRetry.ts:
##########
@@ -0,0 +1,96 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { LazyExoticComponent, lazy } from 'react';
+
+/**
+ * `React.lazy` memoizes the *rejection* of its factory: once the dynamic
+ * `import()` behind a route fails (a chunk that 404s after a redeploy, or a
+ * transient 502/503 from the asset server), the payload is permanently marked
+ * as rejected and the component throws `ChunkLoadError` forever - even after
+ * the asset becomes reachable again and even when the user navigates away and
+ * back. Retrying the import *inside* the factory, before the promise handed to
+ * `React.lazy` settles, is the only way to recover from a transient failure.
+ *
+ * See https://github.com/apache/superset/issues/41266
+ */
+export const DEFAULT_LAZY_RETRIES = 2;
+export const DEFAULT_LAZY_RETRY_DELAY_MS = 500;
+
+export interface LazyRetryOptions {
+ /** Number of *additional* attempts made after the first one fails. */
+ retries?: number;
+ /** Base delay between attempts; doubled on every subsequent attempt. */
+ retryDelayMs?: number;
+}
+
+const sleep = (ms: number): Promise<void> =>
+ new Promise(resolve => {
+ setTimeout(resolve, ms);
+ });
+
+/**
+ * Calls `factory`, retrying with exponential backoff when it rejects. Rejects
+ * with the last error once every attempt has been exhausted.
+ */
+export async function retryImport<T>(
+ factory: () => Promise<T>,
+ {
+ retries = DEFAULT_LAZY_RETRIES,
+ retryDelayMs = DEFAULT_LAZY_RETRY_DELAY_MS,
+ }: LazyRetryOptions = {},
+): Promise<T> {
+ let lastError: unknown;
+ for (let attempt = 0; attempt <= retries; attempt += 1) {
+ try {
+ // eslint-disable-next-line no-await-in-loop
+ return await factory();
+ } catch (error) {
+ lastError = error;
+ if (attempt < retries) {
+ // eslint-disable-next-line no-await-in-loop
+ await sleep(retryDelayMs * 2 ** attempt);
+ }
Review Comment:
Agreed, fixed. Added an `isChunkLoadError` predicate so only recognized chunk-load failures get retried, syntax/module errors surface immediately now.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #43215:
URL: https://github.com/apache/superset/pull/43215#discussion_r4261255289
##########
superset-frontend/src/utils/lazyWithRetry.ts:
##########
@@ -0,0 +1,96 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { LazyExoticComponent, lazy } from 'react';
+
+/**
+ * `React.lazy` memoizes the *rejection* of its factory: once the dynamic
+ * `import()` behind a route fails (a chunk that 404s after a redeploy, or a
+ * transient 502/503 from the asset server), the payload is permanently marked
+ * as rejected and the component throws `ChunkLoadError` forever - even after
+ * the asset becomes reachable again and even when the user navigates away and
+ * back. Retrying the import *inside* the factory, before the promise handed to
+ * `React.lazy` settles, is the only way to recover from a transient failure.
+ *
+ * See https://github.com/apache/superset/issues/41266
+ */
+export const DEFAULT_LAZY_RETRIES = 2;
+export const DEFAULT_LAZY_RETRY_DELAY_MS = 500;
+
+export interface LazyRetryOptions {
+ /** Number of *additional* attempts made after the first one fails. */
+ retries?: number;
+ /** Base delay between attempts; doubled on every subsequent attempt. */
+ retryDelayMs?: number;
+}
+
+const sleep = (ms: number): Promise<void> =>
+ new Promise(resolve => {
+ setTimeout(resolve, ms);
+ });
+
+/**
+ * Calls `factory`, retrying with exponential backoff when it rejects. Rejects
+ * with the last error once every attempt has been exhausted.
+ */
+export async function retryImport<T>(
+ factory: () => Promise<T>,
+ {
+ retries = DEFAULT_LAZY_RETRIES,
+ retryDelayMs = DEFAULT_LAZY_RETRY_DELAY_MS,
+ }: LazyRetryOptions = {},
+): Promise<T> {
+ let lastError: unknown;
+ for (let attempt = 0; attempt <= retries; attempt += 1) {
+ try {
+ // eslint-disable-next-line no-await-in-loop
+ return await factory();
+ } catch (error) {
+ lastError = error;
+ if (attempt < retries) {
+ // eslint-disable-next-line no-await-in-loop
+ await sleep(retryDelayMs * 2 ** attempt);
+ }
Review Comment:
β
**CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `227316f`.
Retries now occur only when `isRetryable(error)` returns true, with the default predicate set to `isChunkLoadError`; non-retryable failures exit the loop immediately.
<sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
<!-- codeant-auto-resolve-reply -->
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #43215:
URL: https://github.com/apache/superset/pull/43215#discussion_r3788995351
##########
superset-frontend/src/utils/lazyWithRetry.ts:
##########
@@ -0,0 +1,96 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { LazyExoticComponent, lazy } from 'react';
+
+/**
+ * `React.lazy` memoizes the *rejection* of its factory: once the dynamic
+ * `import()` behind a route fails (a chunk that 404s after a redeploy, or a
+ * transient 502/503 from the asset server), the payload is permanently marked
+ * as rejected and the component throws `ChunkLoadError` forever - even after
+ * the asset becomes reachable again and even when the user navigates away and
+ * back. Retrying the import *inside* the factory, before the promise handed to
+ * `React.lazy` settles, is the only way to recover from a transient failure.
+ *
+ * See https://github.com/apache/superset/issues/41266
+ */
+export const DEFAULT_LAZY_RETRIES = 2;
+export const DEFAULT_LAZY_RETRY_DELAY_MS = 500;
+
+export interface LazyRetryOptions {
+ /** Number of *additional* attempts made after the first one fails. */
+ retries?: number;
+ /** Base delay between attempts; doubled on every subsequent attempt. */
+ retryDelayMs?: number;
+}
+
+const sleep = (ms: number): Promise<void> =>
+ new Promise(resolve => {
+ setTimeout(resolve, ms);
+ });
+
+/**
+ * Calls `factory`, retrying with exponential backoff when it rejects. Rejects
+ * with the last error once every attempt has been exhausted.
+ */
+export async function retryImport<T>(
+ factory: () => Promise<T>,
+ {
+ retries = DEFAULT_LAZY_RETRIES,
+ retryDelayMs = DEFAULT_LAZY_RETRY_DELAY_MS,
+ }: LazyRetryOptions = {},
+): Promise<T> {
+ let lastError: unknown;
+ for (let attempt = 0; attempt <= retries; attempt += 1) {
+ try {
+ // eslint-disable-next-line no-await-in-loop
+ return await factory();
+ } catch (error) {
+ lastError = error;
+ if (attempt < retries) {
+ // eslint-disable-next-line no-await-in-loop
+ await sleep(retryDelayMs * 2 ** attempt);
+ }
Review Comment:
**Suggestion:** The retry loop treats every factory failure as a transient chunk failure. Deterministic module-evaluation errors, syntax errors, and missing dependencies will therefore be retried twice, adding up to 1.5 seconds of delay before the error boundary can report an error, and multiplying failed requests across all lazy-loaded routes. Restrict retries to retryable chunk-load failures or make the retry predicate configurable. [performance]
<details>
<summary><b>Severity Level:</b> Minor π§Ή</summary>
```mdx
- β οΈ Route module errors are delayed by 1.5 seconds.
- β οΈ Failed imports generate redundant asset requests.
- β οΈ Dashboard and Explore feature errors retry unnecessarily.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=6277c8bc5af349a9b13780ed4234411d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=6277c8bc5af349a9b13780ed4234411d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent π€ </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/src/utils/lazyWithRetry.ts
**Line:** 63:68
**Comment:**
*Performance: The retry loop treats every factory failure as a transient chunk failure. Deterministic module-evaluation errors, syntax errors, and missing dependencies will therefore be retried twice, adding up to 1.5 seconds of delay before the error boundary can report an error, and multiplying failed requests across all lazy-loaded routes. Restrict retries to retryable chunk-load failures or make the retry predicate configurable.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43215&comment_hash=94bcb43cf0cc004bbdc19e76182b139a598f889f9cacb9c82fd4568cd79b13ea&reaction=like'>π</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43215&comment_hash=94bcb43cf0cc004bbdc19e76182b139a598f889f9cacb9c82fd4568cd79b13ea&reaction=dislike'>π</a>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-6301863448
@bikash-barnwal mind cleaning up your PR so it can get merged?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #43215:
URL: https://github.com/apache/superset/pull/43215#discussion_r4261251065
##########
superset-frontend/src/utils/lazyWithRetry.test.tsx:
##########
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Suspense } from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import { lazyWithRetry, retryImport } from './lazyWithRetry';
+
+const chunkLoadError = () => {
+ const error = new Error('Loading chunk 4169 failed.');
+ error.name = 'ChunkLoadError';
+ return error;
+};
+
+const Page = () => <div>Lazy page</div>;
+
+test('lazyWithRetry recovers from a transient ChunkLoadError (#41266)', async () => {
+ const factory = jest
+ .fn()
+ .mockRejectedValueOnce(chunkLoadError())
+ .mockResolvedValue({ default: Page });
+
+ const LazyPage = lazyWithRetry(factory, { retryDelayMs: 0 });
+
+ render(
+ <Suspense fallback={<div>Loading</div>}>
+ <LazyPage />
+ </Suspense>,
+ );
+
+ expect(await screen.findByText('Lazy page')).toBeInTheDocument();
+ expect(factory).toHaveBeenCalledTimes(2);
+});
+
+test('retryImport exhausts its attempts and rethrows the last error (#41266)', async () => {
+ const factory = jest.fn().mockRejectedValue(chunkLoadError());
+
+ await expect(
+ retryImport(factory, { retries: 2, retryDelayMs: 0 }),
Review Comment:
Bikash's gone quiet on this one, so I just pushed a fix directly: two tests that pin `Math.random` to confirm the bound doubles each attempt, then run two concurrent imports with different draws and check their delays actually differ. Should close the gap you flagged instead of relying on `retryDelayMs: 0` alone.
LGTM, thanks for catching it!
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-5620304822
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers an incremental AI Review.
- `/review full` - Manually triggers a full AI Review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-5612315388
This has gone quiet, so I'll see about making touchups...
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-5301433051
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #43215:
URL: https://github.com/apache/superset/pull/43215#discussion_r3817562889
##########
superset-frontend/src/utils/lazyWithRetry.ts:
##########
@@ -0,0 +1,96 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { LazyExoticComponent, lazy } from 'react';
+
+/**
+ * `React.lazy` memoizes the *rejection* of its factory: once the dynamic
+ * `import()` behind a route fails (a chunk that 404s after a redeploy, or a
+ * transient 502/503 from the asset server), the payload is permanently marked
+ * as rejected and the component throws `ChunkLoadError` forever - even after
+ * the asset becomes reachable again and even when the user navigates away and
+ * back. Retrying the import *inside* the factory, before the promise handed to
+ * `React.lazy` settles, is the only way to recover from a transient failure.
+ *
+ * See https://github.com/apache/superset/issues/41266
+ */
+export const DEFAULT_LAZY_RETRIES = 2;
+export const DEFAULT_LAZY_RETRY_DELAY_MS = 500;
+
+export interface LazyRetryOptions {
+ /** Number of *additional* attempts made after the first one fails. */
+ retries?: number;
+ /** Base delay between attempts; doubled on every subsequent attempt. */
+ retryDelayMs?: number;
+}
+
+const sleep = (ms: number): Promise<void> =>
+ new Promise(resolve => {
+ setTimeout(resolve, ms);
+ });
+
+/**
+ * Calls `factory`, retrying with exponential backoff when it rejects. Rejects
+ * with the last error once every attempt has been exhausted.
+ */
+export async function retryImport<T>(
+ factory: () => Promise<T>,
+ {
+ retries = DEFAULT_LAZY_RETRIES,
+ retryDelayMs = DEFAULT_LAZY_RETRY_DELAY_MS,
+ }: LazyRetryOptions = {},
+): Promise<T> {
+ let lastError: unknown;
+ for (let attempt = 0; attempt <= retries; attempt += 1) {
+ try {
+ // eslint-disable-next-line no-await-in-loop
+ return await factory();
+ } catch (error) {
+ lastError = error;
+ if (attempt < retries) {
+ // eslint-disable-next-line no-await-in-loop
+ await sleep(retryDelayMs * 2 ** attempt);
+ }
Review Comment:
Yes. Retries should be limited to recognized chunk-load failures; module evaluation, syntax, and dependency errors are deterministic and should surface immediately.
Use a configurable predicate so callers can support bundler-specific errors while keeping the default focused:
```typescript
export interface LazyRetryOptions {
retries?: number;
retryDelayMs?: number;
isRetryable?: (error: unknown) => boolean;
}
const isChunkLoadError = (error: unknown): boolean =>
error instanceof Error &&
(error.name === 'ChunkLoadError' ||
/loading chunk|failed to fetch dynamically imported module/i.test(
error.message,
));
```
Then stop retrying when the predicate rejects the error:
```typescript
} catch (error) {
lastError = error;
if (attempt < retries && isRetryable(error)) {
// eslint-disable-next-line no-await-in-loop
await sleep(retryDelayMs * 2 ** attempt);
} else {
break;
}
}
```
This preserves recovery for transient 404/502/503 chunk failures while allowing syntax errors and module initialization failures to reach the error boundary without an unnecessary 1.5-second delay. Tests should also cover a non-retryable error and verify the factory is called only once.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-5764109946
Nice, the chunk-name and retry-predicate fixes both look solid. One more before this is ready though: @sadpandajoe's point about jittering the backoff so a burst of clients don't all retry at the same 500ms/1500ms offsets during a real outage. Seems worth doing since that's exactly the scenario this fix is meant to help with.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-5768611467
Heya @bikash-barnwal, this is looking solid, thanks for working through codeant's and sadpandajoe's rounds. The `isChunkLoadError` predicate and the jittered backoff both look right to me.
One thing before I merge, though: sadpandajoe's jitter question never got a reply, and none of the three threads got marked resolved even though the code addresses all of them. Mind closing those out so it's clear they're settled?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on code in PR #43215:
URL: https://github.com/apache/superset/pull/43215#discussion_r3978968732
##########
superset-frontend/src/utils/lazyWithRetry.ts:
##########
@@ -0,0 +1,120 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { LazyExoticComponent, lazy } from 'react';
+
+/**
+ * `React.lazy` memoizes the *rejection* of its factory: once the dynamic
+ * `import()` behind a route fails (a chunk that 404s after a redeploy, or a
+ * transient 502/503 from the asset server), the payload is permanently marked
+ * as rejected and the component throws `ChunkLoadError` forever - even after
+ * the asset becomes reachable again and even when the user navigates away and
+ * back. Retrying the import *inside* the factory, before the promise handed to
+ * `React.lazy` settles, is the only way to recover from a transient failure.
+ *
+ * See https://github.com/apache/superset/issues/41266
+ */
+export const DEFAULT_LAZY_RETRIES = 2;
+export const DEFAULT_LAZY_RETRY_DELAY_MS = 500;
+
+export interface LazyRetryOptions {
+ /** Number of *additional* attempts made after the first one fails. */
+ retries?: number;
+ /** Base delay between attempts; doubled on every subsequent attempt. */
+ retryDelayMs?: number;
+ /**
+ * Predicate deciding whether an error is worth retrying. Defaults to
+ * `isChunkLoadError` so deterministic failures (syntax errors, missing
+ * dependencies, module-evaluation errors) surface immediately instead of
+ * being retried.
+ */
+ isRetryable?: (error: unknown) => boolean;
+}
+
+/**
+ * Recognizes the transient "chunk failed to load" errors browsers/bundlers
+ * raise on a stale or momentarily-unreachable asset, as opposed to
+ * deterministic module errors (syntax errors, missing dependencies) that
+ * will fail identically on every retry.
+ */
+export const isChunkLoadError = (error: unknown): boolean =>
+ error instanceof Error &&
+ (error.name === 'ChunkLoadError' ||
+ /loading chunk|failed to fetch dynamically imported module/i.test(
+ error.message,
+ ));
+
+const sleep = (ms: number): Promise<void> =>
+ new Promise(resolve => {
+ setTimeout(resolve, ms);
+ });
+
+/**
+ * Calls `factory`, retrying with exponential backoff when it rejects with a
+ * retryable error. Rejects with the last error once every attempt has been
+ * exhausted, or immediately when the error is not retryable.
+ */
+export async function retryImport<T>(
+ factory: () => Promise<T>,
+ {
+ retries = DEFAULT_LAZY_RETRIES,
+ retryDelayMs = DEFAULT_LAZY_RETRY_DELAY_MS,
+ isRetryable = isChunkLoadError,
+ }: LazyRetryOptions = {},
+): Promise<T> {
+ let lastError: unknown;
+ for (let attempt = 0; attempt <= retries; attempt += 1) {
+ try {
+ // eslint-disable-next-line no-await-in-loop
+ return await factory();
+ } catch (error) {
+ lastError = error;
+ if (attempt < retries && isRetryable(error)) {
+ // eslint-disable-next-line no-await-in-loop
+ await sleep(retryDelayMs * 2 ** attempt);
Review Comment:
A transient asset-server 502/503 can fail this import for many clients at once, and this fixed schedule makes every affected browser retry again at the same 500 and 1,500 ms offsets, recreating the burst against the already-overloaded server. Could this use a jittered delay, as the client retry path does, to avoid synchronizing retries?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-5301747151
@bikash-barnwal please stop opening up new PRs. You've opened ~20 PRs without (1) properly following up on some of them, as I've commented there and (2) provides attestation on bugfixes in the form After/Before screenshots/videos.
This comment should work as last warning before closing en-mass. A bit harsh-ey but AI-generated PRs are not sustainable for proper human reviews.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on code in PR #43215:
URL: https://github.com/apache/superset/pull/43215#discussion_r3817560350
##########
superset-frontend/src/utils/lazyWithRetry.ts:
##########
@@ -0,0 +1,96 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { LazyExoticComponent, lazy } from 'react';
+
+/**
+ * `React.lazy` memoizes the *rejection* of its factory: once the dynamic
+ * `import()` behind a route fails (a chunk that 404s after a redeploy, or a
+ * transient 502/503 from the asset server), the payload is permanently marked
+ * as rejected and the component throws `ChunkLoadError` forever - even after
+ * the asset becomes reachable again and even when the user navigates away and
+ * back. Retrying the import *inside* the factory, before the promise handed to
+ * `React.lazy` settles, is the only way to recover from a transient failure.
+ *
+ * See https://github.com/apache/superset/issues/41266
+ */
+export const DEFAULT_LAZY_RETRIES = 2;
+export const DEFAULT_LAZY_RETRY_DELAY_MS = 500;
+
+export interface LazyRetryOptions {
+ /** Number of *additional* attempts made after the first one fails. */
+ retries?: number;
+ /** Base delay between attempts; doubled on every subsequent attempt. */
+ retryDelayMs?: number;
+}
+
+const sleep = (ms: number): Promise<void> =>
+ new Promise(resolve => {
+ setTimeout(resolve, ms);
+ });
+
+/**
+ * Calls `factory`, retrying with exponential backoff when it rejects. Rejects
+ * with the last error once every attempt has been exhausted.
+ */
+export async function retryImport<T>(
+ factory: () => Promise<T>,
+ {
+ retries = DEFAULT_LAZY_RETRIES,
+ retryDelayMs = DEFAULT_LAZY_RETRY_DELAY_MS,
+ }: LazyRetryOptions = {},
+): Promise<T> {
+ let lastError: unknown;
+ for (let attempt = 0; attempt <= retries; attempt += 1) {
+ try {
+ // eslint-disable-next-line no-await-in-loop
+ return await factory();
+ } catch (error) {
+ lastError = error;
+ if (attempt < retries) {
+ // eslint-disable-next-line no-await-in-loop
+ await sleep(retryDelayMs * 2 ** attempt);
+ }
Review Comment:
Agreedβthis retries deterministic module-evaluation failures too, delaying the error boundary by 1.5 seconds and repeating any failure-side effects. Should retries be limited to recognized chunk-load failures?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on code in PR #43215:
URL: https://github.com/apache/superset/pull/43215#discussion_r4151659014
##########
superset-frontend/src/utils/lazyWithRetry.test.tsx:
##########
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Suspense } from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import { lazyWithRetry, retryImport } from './lazyWithRetry';
+
+const chunkLoadError = () => {
+ const error = new Error('Loading chunk 4169 failed.');
+ error.name = 'ChunkLoadError';
+ return error;
+};
+
+const Page = () => <div>Lazy page</div>;
+
+test('lazyWithRetry recovers from a transient ChunkLoadError (#41266)', async () => {
+ const factory = jest
+ .fn()
+ .mockRejectedValueOnce(chunkLoadError())
+ .mockResolvedValue({ default: Page });
+
+ const LazyPage = lazyWithRetry(factory, { retryDelayMs: 0 });
+
+ render(
+ <Suspense fallback={<div>Loading</div>}>
+ <LazyPage />
+ </Suspense>,
+ );
+
+ expect(await screen.findByText('Lazy page')).toBeInTheDocument();
+ expect(factory).toHaveBeenCalledTimes(2);
+});
+
+test('retryImport exhausts its attempts and rethrows the last error (#41266)', async () => {
+ const factory = jest.fn().mockRejectedValue(chunkLoadError());
+
+ await expect(
+ retryImport(factory, { retries: 2, retryDelayMs: 0 }),
Review Comment:
With `retryDelayMs: 0` in both retry tests, removing `Math.random()` would still pass and silently restore synchronized retries after a shared asset-server failure. Could we add a `retryImport` test with fake timers, a nonzero delay, and controlled random samples, asserting distinct retry times for two clients and the doubled bound on the next attempt?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): retry a failed lazy import before surfacing ChunkLoadError [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #43215:
URL: https://github.com/apache/superset/pull/43215#issuecomment-6306272221
@sadpandajoe rebased this onto master myself since Bikash has gone quiet. The only conflict was the two new auth routes picking up `lazyWithRetry`, so it should be good to go once CI comes back.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org