sadpandajoe commented on code in PR #43340:
URL: https://github.com/apache/superset/pull/43340#discussion_r3866921272


##########
superset-frontend/src/dashboard/components/menu/DownloadMenuItems/index.tsx:
##########
@@ -16,42 +16,48 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { SyntheticEvent } from "react";
-import { useSelector } from "react-redux";
-import { logging } from "@apache-superset/core/utils";
-import { t } from "@apache-superset/core/translation";
+import { SyntheticEvent } from 'react';
+import { useSelector } from 'react-redux';
+import { logging } from '@apache-superset/core/utils';
+import { t } from '@apache-superset/core/translation';
 import {
   FeatureFlag,
   getClientErrorObject,
   isFeatureEnabled,
   SupersetClient,
-} from "@superset-ui/core";
-import { MenuItem } from "@superset-ui/core/components/Menu";
-import { parse as parseContentDisposition } from "content-disposition";
-import { useDownloadScreenshot } from 
"src/dashboard/hooks/useDownloadScreenshot";
-import { NATIVE_FILTER_PREFIX } from 
"src/dashboard/components/nativeFilters/FiltersConfigModal/utils";
-import { MenuKeys, RootState } from "src/dashboard/types";
-import downloadAsPdf from "src/utils/downloadAsPdf";
-import downloadAsImage from "src/utils/downloadAsImage";
-import handleResourceExport from "src/utils/export";
+} from '@superset-ui/core';
+import { MenuItem } from '@superset-ui/core/components/Menu';
+import { parse as parseContentDisposition } from 'content-disposition';
+import { useDownloadScreenshot } from 
'src/dashboard/hooks/useDownloadScreenshot';
+import { isEmbedded as isEmbeddedDashboard } from 
'src/dashboard/util/isEmbedded';
+import { NATIVE_FILTER_PREFIX } from 
'src/dashboard/components/nativeFilters/FiltersConfigModal/utils';
+import { MenuKeys, RootState } from 'src/dashboard/types';
+import downloadAsPdf from 'src/utils/downloadAsPdf';
+import downloadAsImage from 'src/utils/downloadAsImage';
+import handleResourceExport from 'src/utils/export';
+import { redirect } from 'src/utils/navigationUtils';
 import {
   LOG_ACTIONS_DASHBOARD_DOWNLOAD_AS_PDF,
   LOG_ACTIONS_DASHBOARD_DOWNLOAD_AS_IMAGE,
-} from "src/logger/LogUtils";
-import { useToasts } from "src/components/MessageToasts/withToasts";
+} from 'src/logger/LogUtils';
+import { useToasts } from 'src/components/MessageToasts/withToasts';
 
-import { MenuItemTooltip } from "src/components/Chart/DisabledMenuItemTooltip";
-import { DownloadScreenshotFormat } from "./types";
+import { MenuItemTooltip } from 'src/components/Chart/DisabledMenuItemTooltip';
+import { DownloadScreenshotFormat } from './types';
 
 // A guest/embedded session has no email address to be notified at, so rather
 // than wait on that notification the frontend polls for completion instead;
 // the same polling also drives the auto-download for a regular session,
 // which arrives before its export email in practice.
 const EXPORT_STATUS_POLL_INTERVAL_MS = 3000;
 const EXPORT_STATUS_POLL_TIMEOUT_MS = 5 * 60 * 1000;
+// An embedded guest has no email fallback: if the client stops polling, a
+// slow-but-successful export is orphaned with no way to retrieve it. Outlive
+// the server's hard task budget (11 minutes) instead of racing it.
+const EMBEDDED_EXPORT_STATUS_POLL_TIMEOUT_MS = 12 * 60 * 1000;

Review Comment:
   This timeout starts when the request is enqueued, but the Celery hard limit 
starts only when a worker begins running. A queued guest export can spend part 
of these twelve minutes waiting, then finish after polling has stopped; without 
email or a retained job handle, its successful artifact is unreachable. Could 
the timeout include queue delay or expose a resumable status/download 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]

Reply via email to