diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 501535bd7f..bbdda873f3 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -160929,6 +160929,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 8dc9a5964f..7e4e89eeab 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -106639,6 +106639,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index ef55653c27..e495cffbee 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -103300,6 +103300,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 3f27649267..1f1869f412 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -164145,6 +164145,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/lib/init-action.js b/lib/init-action.js index 721758e0d8..34c83bc4ae 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -103986,6 +103986,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index eafa726a6f..2e5438c36e 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -103308,6 +103308,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index fe37a2dbda..445f3b5768 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -103417,6 +103417,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 49ba374833..1730dbe7ba 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -160812,6 +160812,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index b361c5136f..1aa9d0f634 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -120388,6 +120388,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/lib/upload-lib.js b/lib/upload-lib.js index ce94ad390e..7310bb9403 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -106277,6 +106277,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 60dcac6d80..012fb84a6f 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -160812,6 +160812,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index e300737a9e..e326893e67 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -106323,6 +106323,12 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) info: core5.info, warn: core5.warning, error: core5.error + }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451] } }) ); diff --git a/src/api-client.test.ts b/src/api-client.test.ts index 073f68ff1b..3af9ae282f 100644 --- a/src/api-client.test.ts +++ b/src/api-client.test.ts @@ -36,6 +36,9 @@ test("getApiClient", async (t) => { baseUrl: "http://api.github.localhost", log: sinon.match.any, userAgent: `CodeQL-Action/${actionsUtil.getActionVersion()}`, + retry: { + doNotRetry: [400, 410, 422, 451], + }, }), ); }); diff --git a/src/api-client.ts b/src/api-client.ts index f2fe01edf0..13babcd385 100644 --- a/src/api-client.ts +++ b/src/api-client.ts @@ -51,6 +51,12 @@ function createApiClientWithDetails( warn: core.warning, error: core.error, }, + retry: { + // The default is 400, 401, 403, 404, 410, 422, and 451. We have observed transient errors + // with authentication, so we remove 401, 403, and 404 from the default list to ensure that + // these errors are retried. + doNotRetry: [400, 410, 422, 451], + }, }), ); }