From 65e9e640eee8bd9544d635018b785e3902144ccd Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Thu, 2 Oct 2025 17:45:08 +0100 Subject: [PATCH 1/2] Make `matrix` available to `start-proxy` action --- start-proxy/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/start-proxy/action.yml b/start-proxy/action.yml index 14d2cd1f89..17fc3bbe64 100644 --- a/start-proxy/action.yml +++ b/start-proxy/action.yml @@ -16,6 +16,9 @@ inputs: language: description: The programming language to setup the proxy for the correct ecosystem required: false + matrix: + default: ${{ toJson(matrix) }} + required: false outputs: proxy_host: description: The IP address of the proxy From 7fb8378d93a9c48917835b918be8813792a0dd26 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 3 Oct 2025 11:59:36 +0100 Subject: [PATCH 2/2] Re-throw exception in `createStatusReportBase` when in test mode --- lib/analyze-action.js | 3 +++ lib/autobuild-action.js | 3 +++ lib/init-action-post.js | 3 +++ lib/init-action.js | 3 +++ lib/resolve-environment-action.js | 3 +++ lib/start-proxy-action.js | 3 +++ lib/upload-sarif-action.js | 3 +++ src/status-report.ts | 6 ++++++ 8 files changed, 27 insertions(+) diff --git a/lib/analyze-action.js b/lib/analyze-action.js index d873c64dc8..c2788900b3 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -94123,6 +94123,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 316585f7fd..4cde47d65b 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -79872,6 +79872,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 0c352bbd7b..e138420a3e 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -131599,6 +131599,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/init-action.js b/lib/init-action.js index 8ad9767743..2f509ad0ee 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -90274,6 +90274,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index 1413b95935..67cb394e74 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -79499,6 +79499,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index 1366fbcadf..f262402cf9 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -95649,6 +95649,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 12ad80cd9b..7ad72583b5 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -89910,6 +89910,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/src/status-report.ts b/src/status-report.ts index b0e39aa54b..9bfd14677d 100644 --- a/src/status-report.ts +++ b/src/status-report.ts @@ -375,6 +375,12 @@ export async function createStatusReportBase( logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`, ); + + // Re-throw the exception in test mode. While testing, we want to know if something goes wrong here. + if (isInTestMode()) { + throw e; + } + return undefined; } }