From b00ab285b5540fb93164e07c5b1cdd7d3bacdb97 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Thu, 11 Sep 2025 22:53:03 +0200 Subject: [PATCH 1/3] chore(maven): Bump retry deadline to 2 hours Increased SONATYPE_RETRY_DEADLINE from 60 minutes to 2 hours. This is needed for the cases when multiple repos publish to maven central at the same time (it processes them sequentially) --- src/targets/maven.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/targets/maven.ts b/src/targets/maven.ts index fcc2355d..1c20833c 100644 --- a/src/targets/maven.ts +++ b/src/targets/maven.ts @@ -24,7 +24,7 @@ export const NEXUS_API_BASE_URL = 'https://ossrh-staging-api.central.sonatype.com'; export const CENTRAL_API_BASE_URL = 'https://central.sonatype.com/api/v1'; const NEXUS_RETRY_DELAY = 10 * 1000; // 10s -const SONATYPE_RETRY_DEADLINE = 60 * 60 * 1000; // 60min +const SONATYPE_RETRY_DEADLINE = 120 * 60 * 1000; // 2h const CENTRAL_RETRY_DELAY = 60 * 1000; // 1min export type NexusRepository = { From 55af59cc2e51d5733adb0d25cdabbcd8170d9e05 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Fri, 12 Sep 2025 09:51:39 +0200 Subject: [PATCH 2/3] Update deadline duration in maven test --- src/targets/__tests__/maven.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/targets/__tests__/maven.test.ts b/src/targets/__tests__/maven.test.ts index 9a63071e..2aaacc85 100644 --- a/src/targets/__tests__/maven.test.ts +++ b/src/targets/__tests__/maven.test.ts @@ -808,13 +808,13 @@ describe('closeRepository', () => { Promise.resolve(getRepositoryInfo('open')) ); - // Deadline is 60min, so we fake pooling start time and initial read to 1min - // and second iteration to something over 60min + // Deadline is 2h, so we fake pooling start time and initial read to 1min + // and second iteration to something over 2h jest .spyOn(Date, 'now') .mockImplementationOnce(() => 1 * 60 * 1000) .mockImplementationOnce(() => 1 * 60 * 1000) - .mockImplementationOnce(() => 62 * 60 * 1000); + .mockImplementationOnce(() => 122 * 60 * 1000); await expect(mvnTarget.closeRepository(repositoryId)).rejects.toThrow( new Error('Deadline for Nexus repository status change reached.') From 8ddb5a179eb1fe335568020d3dcb87a9d60f07de Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Fri, 12 Sep 2025 09:53:44 +0200 Subject: [PATCH 3/3] Update test deadline from 60min to 2h --- src/targets/__tests__/maven.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/targets/__tests__/maven.test.ts b/src/targets/__tests__/maven.test.ts index 2aaacc85..e1dce99a 100644 --- a/src/targets/__tests__/maven.test.ts +++ b/src/targets/__tests__/maven.test.ts @@ -915,13 +915,13 @@ describe('releaseRepository', () => { deploymentState: 'PUBLISHING' }) - // Deadline is 60min, so we fake pooling start time and initial read to 1min - // and second iteration to something over 60min + // Deadline is 2h, so we fake pooling start time and initial read to 1min + // and second iteration to something over 2h jest .spyOn(Date, 'now') .mockImplementationOnce(() => 1 * 60 * 1000) .mockImplementationOnce(() => 1 * 60 * 1000) - .mockImplementationOnce(() => 62 * 60 * 1000); + .mockImplementationOnce(() => 122 * 60 * 1000); await expect(mvnTarget.releaseRepository(repositoryId)).rejects.toThrow( new Error('Deadline for Central repository status change reached.')