diff --git a/src/Explorer/Notebook/NotebookContainerClient.ts b/src/Explorer/Notebook/NotebookContainerClient.ts index f58b0d53c..76d4ba2b8 100644 --- a/src/Explorer/Notebook/NotebookContainerClient.ts +++ b/src/Explorer/Notebook/NotebookContainerClient.ts @@ -2,7 +2,7 @@ * Notebook container related stuff */ import { useDialog } from "Explorer/Controls/Dialog"; -import promiseRetry, { AbortError } from "p-retry"; +import promiseRetry, { AbortError, Options } from "p-retry"; import { PhoenixClient } from "Phoenix/PhoenixClient"; import * as Constants from "../../Common/Constants"; import { ConnectionStatusType, HttpHeaders, HttpStatusCodes, Notebook, PoolIdType } from "../../Common/Constants"; @@ -19,7 +19,7 @@ export class NotebookContainerClient { private clearReconnectionAttemptMessage? = () => {}; private isResettingWorkspace: boolean; private phoenixClient: PhoenixClient; - private retryOptions: promiseRetry.Options; + private retryOptions: Options; private scheduleTimerId: NodeJS.Timeout; constructor(private onConnectionLost: () => void) { diff --git a/src/Phoenix/PhoenixClient.ts b/src/Phoenix/PhoenixClient.ts index 3357c53fd..f8a90f6a2 100644 --- a/src/Phoenix/PhoenixClient.ts +++ b/src/Phoenix/PhoenixClient.ts @@ -4,7 +4,7 @@ import { Action } from "Shared/Telemetry/TelemetryConstants"; import { userContext } from "UserContext"; import { allowedJunoOrigins, validateEndpoint } from "Utils/EndpointUtils"; import { useQueryCopilot } from "hooks/useQueryCopilot"; -import promiseRetry, { AbortError } from "p-retry"; +import promiseRetry, { AbortError, Options } from "p-retry"; import { Areas, ConnectionStatusType, @@ -35,7 +35,7 @@ import { getAuthorizationHeader } from "../Utils/AuthorizationUtils"; export class PhoenixClient { private armResourceId: string; private containerHealthHandler: NodeJS.Timeout; - private retryOptions: promiseRetry.Options = { + private retryOptions: Options = { retries: Notebook.retryAttempts, maxTimeout: Notebook.retryAttemptDelayMs, minTimeout: Notebook.retryAttemptDelayMs, diff --git a/src/SelfServe/SelfServeComponent.tsx b/src/SelfServe/SelfServeComponent.tsx index 207f7ffc3..470adb833 100644 --- a/src/SelfServe/SelfServeComponent.tsx +++ b/src/SelfServe/SelfServeComponent.tsx @@ -10,7 +10,7 @@ import { Text, } from "@fluentui/react"; import { TFunction } from "i18next"; -import promiseRetry, { AbortError } from "p-retry"; +import promiseRetry, { AbortError, Options } from "p-retry"; import React from "react"; import { WithTranslation } from "react-i18next"; import * as _ from "underscore"; @@ -80,7 +80,7 @@ export class SelfServeComponent extends React.Component