From 33dee904e391efcb1dcec6504cfbaab44059dd91 Mon Sep 17 00:00:00 2001 From: Cristian Dominguez Date: Mon, 12 Jan 2026 10:53:53 -0300 Subject: [PATCH 1/2] fix: increase poll frequency to 1s --- src/commands/project/deploy/report.ts | 3 ++- src/commands/project/deploy/resume.ts | 2 +- src/commands/project/deploy/validate.ts | 2 +- src/commands/project/retrieve/start.ts | 2 +- src/utils/deploy.ts | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/commands/project/deploy/report.ts b/src/commands/project/deploy/report.ts index ca33990b..29ed6850 100644 --- a/src/commands/project/deploy/report.ts +++ b/src/commands/project/deploy/report.ts @@ -17,6 +17,7 @@ import { Messages, Org, SfProject } from '@salesforce/core'; import { SfCommand, Flags } from '@salesforce/sf-plugins-core'; import { ComponentSet, DeployResult, MetadataApiDeploy, RequestStatus } from '@salesforce/source-deploy-retrieve'; +import { Duration } from '@salesforce/kit'; import { DeployStages } from '../../../utils/deployStages.js'; import { buildComponentSet } from '../../../utils/deploy.js'; import { DeployCache } from '../../../utils/deployCache.js'; @@ -137,7 +138,7 @@ export default class DeployMetadataReport extends SfCommand { title: 'Deploying Metadata', jsonEnabled: this.jsonEnabled(), }).start({ deploy: mdapiDeploy, username: org.getUsername() }); - result = await mdapiDeploy.pollStatus(500, wait.seconds); + result = await mdapiDeploy.pollStatus(Duration.seconds(1).milliseconds, wait.seconds); } catch (error) { if (error instanceof Error && error.message.includes('The client has timed out')) { this.debug('[project deploy report] polling timed out. Requesting status...'); diff --git a/src/commands/project/deploy/resume.ts b/src/commands/project/deploy/resume.ts index 8230fd23..341fa2c0 100644 --- a/src/commands/project/deploy/resume.ts +++ b/src/commands/project/deploy/resume.ts @@ -154,7 +154,7 @@ export default class DeployMetadataResume extends SfCommand { } ); - result = await deploy.pollStatus(500, wait.seconds); + result = await deploy.pollStatus(Duration.seconds(1).milliseconds, wait.seconds); if (!deploy.id) { throw new SfError('The deploy id is not available.'); diff --git a/src/commands/project/deploy/validate.ts b/src/commands/project/deploy/validate.ts index ec7cdbfa..bc4b65c7 100644 --- a/src/commands/project/deploy/validate.ts +++ b/src/commands/project/deploy/validate.ts @@ -236,7 +236,7 @@ export default class DeployMetadataValidate extends SfCommand } ); - const result = await deploy.pollStatus(500, flags.wait?.seconds); + const result = await deploy.pollStatus(Duration.seconds(1).milliseconds, flags.wait?.seconds); process.exitCode = determineExitCode(result); const formatter = new DeployResultFormatter(result, { ...flags, diff --git a/src/commands/project/retrieve/start.ts b/src/commands/project/retrieve/start.ts index 8fe4f680..438abd96 100644 --- a/src/commands/project/retrieve/start.ts +++ b/src/commands/project/retrieve/start.ts @@ -298,7 +298,7 @@ export default class RetrieveMetadata extends SfCommand { throw error; }); - this.retrieveResult = await retrieve.pollStatus(500, flags.wait.seconds); + this.retrieveResult = await retrieve.pollStatus(Duration.seconds(1).milliseconds, flags.wait.seconds); } this.ms.stop(); diff --git a/src/utils/deploy.ts b/src/utils/deploy.ts index 170ad9e2..909f07f4 100644 --- a/src/utils/deploy.ts +++ b/src/utils/deploy.ts @@ -209,7 +209,7 @@ export async function cancelDeploy(opts: Partial, id: string): Pr await deploy.cancel(); return deploy.pollStatus({ - frequency: Duration.milliseconds(500), + frequency: Duration.seconds(1), timeout: opts.wait ?? Duration.minutes(33), }); } From c4edbbf4429cf1370501dd41169ffbfa063d7d8b Mon Sep 17 00:00:00 2001 From: Cristian Dominguez Date: Mon, 12 Jan 2026 15:51:26 -0300 Subject: [PATCH 2/2] chore: ci re-run