From 1417991b69660046cc0b4f1ea93a5903b037f3b1 Mon Sep 17 00:00:00 2001 From: Frederik Rothenberger Date: Fri, 26 Apr 2024 10:30:52 +0200 Subject: [PATCH] Configure up to 10 retries on agent failure (#2447) Configure up to 10 retries on agnet failure This PR configures the number of retries to 10 (as opposed to just 3, which is the default). This makes the agent more resilient against watermark check failures, because the likelihood of hitting only replicas that are behind gets lowered a lot and retrying takes time too. Addresses [this comment](https://github.com/dfinity/internet-identity/pull/2446#issuecomment-2078795472). --- src/frontend/src/flows/verifiableCredentials/vcIssuer.ts | 1 + src/frontend/src/utils/iiConnection.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/frontend/src/flows/verifiableCredentials/vcIssuer.ts b/src/frontend/src/flows/verifiableCredentials/vcIssuer.ts index 28ae387c73..feaf39d979 100644 --- a/src/frontend/src/flows/verifiableCredentials/vcIssuer.ts +++ b/src/frontend/src/flows/verifiableCredentials/vcIssuer.ts @@ -25,6 +25,7 @@ export class VcIssuer { const agent = new HttpAgent({ host: inferHost(), identity, + retryTimes: 10, }); // Only fetch the root key when we're not in prod diff --git a/src/frontend/src/utils/iiConnection.ts b/src/frontend/src/utils/iiConnection.ts index f2082f26d5..b9d245a2a2 100644 --- a/src/frontend/src/utils/iiConnection.ts +++ b/src/frontend/src/utils/iiConnection.ts @@ -379,6 +379,7 @@ export class Connection { const agent = new HttpAgent({ identity: delegationIdentity, host: inferHost(), + retryTimes: 10, }); // Only fetch the root key when we're not in prod