From e67ad6aaed30b5455228aba47dcb1e57fa62ad90 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Thu, 8 Dec 2022 18:13:48 +0000 Subject: [PATCH 1/6] Add telemetry for uploading failed runs --- lib/actions-util.js.map | 2 +- lib/init-action-post-helper.js | 23 ++++++++++--- lib/init-action-post-helper.js.map | 2 +- lib/init-action-post.js | 24 ++++++++++---- lib/init-action-post.js.map | 2 +- src/actions-util.ts | 7 +++- src/init-action-post-helper.ts | 44 ++++++++++++++++++++++--- src/init-action-post.ts | 52 ++++++++++++++++++++++++++---- 8 files changed, 130 insertions(+), 26 deletions(-) diff --git a/lib/actions-util.js.map b/lib/actions-util.js.map index 742c76449f..655f79aea5 100644 --- a/lib/actions-util.js.map +++ b/lib/actions-util.js.map @@ -1 +1 @@ -{"version":3,"file":"actions-util.js","sourceRoot":"","sources":["../src/actions-util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AACtC,yEAA2D;AAC3D,kEAAoD;AAEpD,kDAAoC;AAEpC,gEAAkD;AAClD,iCAUgB;AAChB,yCAA6C;AAE7C,8CAA8C;AAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEvC;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACjD,CAAC;AAFD,4CAEC;AAED;;;;;GAKG;AACI,MAAM,gBAAgB,GAAG,UAAU,IAAY;IACpD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9C,CAAC,CAAC;AAHW,QAAA,gBAAgB,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;oBACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC;oBACpD,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjB;qBAAM,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE;oBAC9B,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;iBAC7C;aACF;QACH,CAAC,CAAC;QACF,YAAY,CAAC,aAAa,CAAC,CAAC;KAC7B;AACH,CAAC;AA7BD,wCA6BC"} \ No newline at end of file diff --git a/lib/init-action-post-helper.js b/lib/init-action-post-helper.js index 4872a9e759..41e0a6fdfe 100644 --- a/lib/init-action-post-helper.js +++ b/lib/init-action-post-helper.js @@ -30,14 +30,15 @@ const uploadLib = __importStar(require("./upload-lib")); const util_1 = require("./util"); const workflow_1 = require("./workflow"); async function uploadFailedSarif(config, repositoryNwo, featureEnablement, logger) { + var _a, _b; if (!config.codeQLCmd) { logger.warning("CodeQL command not found. Unable to upload failed SARIF file."); - return; + return { upload_failed_run_skipped_because: "CodeQL command not found" }; } const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd); if (!(await featureEnablement.getValue(feature_flags_1.Feature.UploadFailedSarifEnabled, codeql))) { logger.debug("Uploading failed SARIF is disabled."); - return; + return { upload_failed_run_skipped_because: "Feature disabled" }; } const workflow = await (0, workflow_1.getWorkflow)(); const jobName = (0, util_1.getRequiredEnvParam)("GITHUB_JOB"); @@ -45,7 +46,7 @@ async function uploadFailedSarif(config, repositoryNwo, featureEnablement, logge if ((0, workflow_1.getUploadInputOrThrow)(workflow, jobName, matrix) !== "true" || (0, util_1.isInTestMode)()) { logger.debug("Won't upload a failed SARIF file since SARIF upload is disabled."); - return; + return { upload_failed_run_skipped_because: "SARIF upload is disabled" }; } const category = (0, workflow_1.getCategoryInputOrThrow)(workflow, jobName, matrix); const checkoutPath = (0, workflow_1.getCheckoutPathInputOrThrow)(workflow, jobName, matrix); @@ -54,6 +55,10 @@ async function uploadFailedSarif(config, repositoryNwo, featureEnablement, logge core.info(`Uploading failed SARIF file ${sarifFile}`); const uploadResult = await uploadLib.uploadFromActions(sarifFile, checkoutPath, category, logger); await uploadLib.waitForProcessing(repositoryNwo, uploadResult.sarifID, logger, { isUnsuccessfulExecution: true }); + return { + upload_failed_run_raw_upload_size_bytes: (_a = uploadResult === null || uploadResult === void 0 ? void 0 : uploadResult.statusReport) === null || _a === void 0 ? void 0 : _a.raw_upload_size_bytes, + upload_failed_run_zipped_upload_size_bytes: (_b = uploadResult === null || uploadResult === void 0 ? void 0 : uploadResult.statusReport) === null || _b === void 0 ? void 0 : _b.zipped_upload_size_bytes, + }; } exports.uploadFailedSarif = uploadFailedSarif; async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, printDebugLogs, repositoryNwo, featureEnablement, logger) { @@ -64,9 +69,10 @@ async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, p } // Environment variable used to integration test uploading a SARIF file for failed runs const expectFailedSarifUpload = process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true"; + let uploadFailedSarifResult; if (process.env[shared_environment_1.CODEQL_ACTION_ANALYZE_DID_UPLOAD_SARIF] !== "true") { try { - await uploadFailedSarif(config, repositoryNwo, featureEnablement, logger); + uploadFailedSarifResult = await uploadFailedSarif(config, repositoryNwo, featureEnablement, logger); } catch (e) { if (expectFailedSarifUpload) { @@ -74,11 +80,19 @@ async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, p `the following error: ${e}`); } logger.info(`Failed to upload a SARIF file for the failed run. Error: ${e}`); + uploadFailedSarifResult = { + upload_failed_run_error: e instanceof Error ? e.message : String(e), + }; } } else if (expectFailedSarifUpload) { throw new Error("Expected to upload a SARIF file for the failed run, but didn't."); } + else { + uploadFailedSarifResult = { + upload_failed_run_skipped_because: "SARIF file already uploaded", + }; + } // Upload appropriate Actions artifacts for debugging if (config.debugMode) { core.info("Debug mode is on. Uploading available database bundles and logs as Actions debugging artifacts..."); @@ -86,6 +100,7 @@ async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, p await uploadLogsDebugArtifact(config); await printDebugLogs(config); } + return uploadFailedSarifResult; } exports.run = run; //# sourceMappingURL=init-action-post-helper.js.map \ No newline at end of file diff --git a/lib/init-action-post-helper.js.map b/lib/init-action-post-helper.js.map index 7c771eb345..5d431ef540 100644 --- a/lib/init-action-post-helper.js.map +++ b/lib/init-action-post-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action-post-helper.js","sourceRoot":"","sources":["../src/init-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,qCAAqC;AACrC,iDAAmD;AACnD,mDAA6D;AAG7D,6DAA8E;AAC9E,wDAA0C;AAC1C,iCAA6E;AAC7E,yCAKoB;AAEb,KAAK,UAAU,iBAAiB,CACrC,MAAc,EACd,aAA4B,EAC5B,iBAAoC,EACpC,MAAc;IAEd,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;QACrB,MAAM,CAAC,OAAO,CACZ,+DAA+D,CAChE,CAAC;QACF,OAAO;KACR;IACD,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,IACE,CAAC,CAAC,MAAM,iBAAiB,CAAC,QAAQ,CAChC,uBAAO,CAAC,wBAAwB,EAChC,MAAM,CACP,CAAC,EACF;QACA,MAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACpD,OAAO;KACR;IACD,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAW,GAAE,CAAC;IACrC,MAAM,OAAO,GAAG,IAAA,0BAAmB,EAAC,YAAY,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,IAAA,uBAAgB,EAAC,WAAW,CAAC,gBAAgB,CAAC,QAAQ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AAO,CAAC,GAAG,CAAC,2DAAsC,CAAC,KAAK,MAAM,EAAE;QAClE,IAAI;YACF,MAAM,iBAAiB,CAAC,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAC;SAC3E;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,uBAAuB,EAAE;gBAC3B,MAAM,IAAI,KAAK,CACb,sEAAsE;oBACpE,wBAAwB,CAAC,EAAE,CAC9B,CAAC;aACH;YACD,MAAM,CAAC,IAAI,CACT,4DAA4D,CAAC,EAAE,CAChE,CAAC;SACH;KACF;SAAM,IAAI,uBAAuB,EAAE;QAClC,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;KACH;IAED,qDAAqD;IACrD,IAAI,MAAM,CAAC,SAAS,EAAE;QACpB,IAAI,CAAC,IAAI,CACP,mGAAmG,CACpG,CAAC;QACF,MAAM,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;AACH,CAAC;AAlDD,kBAkDC"} \ No newline at end of file +{"version":3,"file":"init-action-post-helper.js","sourceRoot":"","sources":["../src/init-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,qCAAqC;AACrC,iDAAmD;AACnD,mDAA6D;AAG7D,6DAA8E;AAC9E,wDAA0C;AAC1C,iCAA6E;AAC7E,yCAKoB;AAcb,KAAK,UAAU,iBAAiB,CACrC,MAAc,EACd,aAA4B,EAC5B,iBAAoC,EACpC,MAAc;;IAEd,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;QACrB,MAAM,CAAC,OAAO,CACZ,+DAA+D,CAChE,CAAC;QACF,OAAO,EAAE,iCAAiC,EAAE,0BAA0B,EAAE,CAAC;KAC1E;IACD,MAAM,MAAM,GAAG,MAAM,IAAA,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H;KACF;SAAM,IAAI,uBAAuB,EAAE;QAClC,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;KACH;SAAM;QACL,uBAAuB,GAAG;YACxB,iCAAiC,EAAE,6BAA6B;SACjE,CAAC;KACH;IAED,qDAAqD;IACrD,IAAI,MAAM,CAAC,SAAS,EAAE;QACpB,IAAI,CAAC,IAAI,CACP,mGAAmG,CACpG,CAAC;QACF,MAAM,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAlED,kBAkEC"} \ No newline at end of file diff --git a/lib/init-action-post.js b/lib/init-action-post.js index f227a4ea1d..090110b5e3 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const core = __importStar(require("@actions/core")); -const actionsUtil = __importStar(require("./actions-util")); +const actions_util_1 = require("./actions-util"); const api_client_1 = require("./api-client"); const debugArtifacts = __importStar(require("./debug-artifacts")); const feature_flags_1 = require("./feature-flags"); @@ -34,18 +34,30 @@ const logging_1 = require("./logging"); const repository_1 = require("./repository"); const util_1 = require("./util"); async function runWrapper() { + const startedAt = new Date(); + let uploadFailedSarifResult; try { const logger = (0, logging_1.getActionsLogger)(); const gitHubVersion = await (0, api_client_1.getGitHubVersion)(); (0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger); const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY")); - const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger); - await initActionPostHelper.run(debugArtifacts.uploadDatabaseBundleDebugArtifact, debugArtifacts.uploadLogsDebugArtifact, actionsUtil.printDebugLogs, repositoryNwo, features, logger); + const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), logger); + uploadFailedSarifResult = await initActionPostHelper.run(debugArtifacts.uploadDatabaseBundleDebugArtifact, debugArtifacts.uploadLogsDebugArtifact, actions_util_1.printDebugLogs, repositoryNwo, features, logger); } - catch (error) { - core.setFailed(`init post-action step failed: ${error}`); - console.log(error); + catch (e) { + core.setFailed(e instanceof Error ? e.message : String(e)); + console.log(e); + await (0, actions_util_1.sendStatusReport)(await (0, actions_util_1.createStatusReportBase)("init-post", (0, actions_util_1.getActionsStatus)(e), startedAt, String(e), e instanceof Error ? e.stack : undefined)); + return; } + const statusReportBase = await (0, actions_util_1.createStatusReportBase)("init-post", "success", startedAt); + const statusReport = { + ...statusReportBase, + ...uploadFailedSarifResult, + }; + console.log("status report"); + console.log(statusReport); + await (0, actions_util_1.sendStatusReport)(statusReport); } void runWrapper(); //# sourceMappingURL=init-action-post.js.map \ No newline at end of file diff --git a/lib/init-action-post.js.map b/lib/init-action-post.js.map index 241364367b..54243b57ad 100644 --- a/lib/init-action-post.js.map +++ b/lib/init-action-post.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action-post.js","sourceRoot":"","sources":["../src/init-action-post.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,4DAA8C;AAC9C,6CAAgD;AAChD,kEAAoD;AACpD,mDAA2C;AAC3C,gFAAkE;AAClE,uCAA6C;AAC7C,6CAAkD;AAClD,iCAAwE;AAExE,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;QAClC,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAEjD,MAAM,aAAa,GAAG,IAAA,+BAAkB,EACtC,IAAA,0BAAmB,EAAC,mBAAmB,CAAC,CACzC,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,wBAAQ,CAC3B,aAAa,EACb,aAAa,EACb,WAAW,CAAC,qBAAqB,EAAE,EACnC,MAAM,CACP,CAAC;QAEF,MAAM,oBAAoB,CAAC,GAAG,CAC5B,cAAc,CAAC,iCAAiC,EAChD,cAAc,CAAC,uBAAuB,EACtC,WAAW,CAAC,cAAc,EAC1B,aAAa,EACb,QAAQ,EACR,MAAM,CACP,CAAC;KACH;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,iCAAiC,KAAK,EAAE,CAAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACpB;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"init-action-post.js","sourceRoot":"","sources":["../src/init-action-post.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,iDAOwB;AACxB,6CAAgD;AAChD,kEAAoD;AACpD,mDAA2C;AAC3C,gFAAkE;AAClE,uCAA6C;AAC7C,6CAAkD;AAClD,iCAAwE;AAMxE,KAAK,UAAU,UAAU;IACvB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,IAAI,uBAES,CAAC;IACd,IAAI;QACF,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;QAClC,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAEjD,MAAM,aAAa,GAAG,IAAA,+BAAkB,EACtC,IAAA,0BAAmB,EAAC,mBAAmB,CAAC,CACzC,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,wBAAQ,CAC3B,aAAa,EACb,aAAa,EACb,IAAA,oCAAqB,GAAE,EACvB,MAAM,CACP,CAAC;QAEF,uBAAuB,GAAG,MAAM,oBAAoB,CAAC,GAAG,CACtD,cAAc,CAAC,iCAAiC,EAChD,cAAc,CAAC,uBAAuB,EACtC,6BAAc,EACd,aAAa,EACb,QAAQ,EACR,MAAM,CACP,CAAC;KACH;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,SAAS,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAE3D,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACf,MAAM,IAAA,+BAAgB,EACpB,MAAM,IAAA,qCAAsB,EAC1B,WAAW,EACX,IAAA,+BAAgB,EAAC,CAAC,CAAC,EACnB,SAAS,EACT,MAAM,CAAC,CAAC,CAAC,EACT,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CACzC,CACF,CAAC;QACF,OAAO;KACR;IACD,MAAM,gBAAgB,GAAG,MAAM,IAAA,qCAAsB,EACnD,WAAW,EACX,SAAS,EACT,SAAS,CACV,CAAC;IACF,MAAM,YAAY,GAAyB;QACzC,GAAG,gBAAgB;QACnB,GAAG,uBAAuB;KAC3B,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC7B,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1B,MAAM,IAAA,+BAAgB,EAAC,YAAY,CAAC,CAAC;AACvC,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/src/actions-util.ts b/src/actions-util.ts index 5ac7226dad..f1382a392f 100644 --- a/src/actions-util.ts +++ b/src/actions-util.ts @@ -295,7 +295,12 @@ function getRefFromEnv(): string { return refEnv; } -type ActionName = "init" | "autobuild" | "finish" | "upload-sarif"; +type ActionName = + | "init" + | "autobuild" + | "finish" + | "upload-sarif" + | "init-post"; type ActionStatus = | "starting" | "aborted" diff --git a/src/init-action-post-helper.ts b/src/init-action-post-helper.ts index 49e587ad1c..90cb119484 100644 --- a/src/init-action-post-helper.ts +++ b/src/init-action-post-helper.ts @@ -16,17 +16,29 @@ import { getWorkflow, } from "./workflow"; +export interface UploadFailedSarifResult { + /** Size in bytes of the unzipped SARIF payload uploaded for the failed run. */ + upload_failed_run_raw_upload_size_bytes?: number; + /** Size in bytes of actual SARIF payload uploaded for the failed run. */ + upload_failed_run_zipped_upload_size_bytes?: number; + + /** Error encountered during uploading the failed run. */ + upload_failed_run_error?: string; + /** Reason why we did not upload a SARIF payload with `executionSuccessful: false`. */ + upload_failed_run_skipped_because?: string; +} + export async function uploadFailedSarif( config: Config, repositoryNwo: RepositoryNwo, featureEnablement: FeatureEnablement, logger: Logger -) { +): Promise { if (!config.codeQLCmd) { logger.warning( "CodeQL command not found. Unable to upload failed SARIF file." ); - return; + return { upload_failed_run_skipped_because: "CodeQL command not found" }; } const codeql = await getCodeQL(config.codeQLCmd); if ( @@ -36,7 +48,7 @@ export async function uploadFailedSarif( )) ) { logger.debug("Uploading failed SARIF is disabled."); - return; + return { upload_failed_run_skipped_because: "Feature disabled" }; } const workflow = await getWorkflow(); const jobName = getRequiredEnvParam("GITHUB_JOB"); @@ -48,7 +60,7 @@ export async function uploadFailedSarif( logger.debug( "Won't upload a failed SARIF file since SARIF upload is disabled." ); - return; + return { upload_failed_run_skipped_because: "SARIF upload is disabled" }; } const category = getCategoryInputOrThrow(workflow, jobName, matrix); const checkoutPath = getCheckoutPathInputOrThrow(workflow, jobName, matrix); @@ -69,6 +81,12 @@ export async function uploadFailedSarif( logger, { isUnsuccessfulExecution: true } ); + return { + upload_failed_run_raw_upload_size_bytes: + uploadResult?.statusReport?.raw_upload_size_bytes, + upload_failed_run_zipped_upload_size_bytes: + uploadResult?.statusReport?.zipped_upload_size_bytes, + }; } export async function run( @@ -91,9 +109,16 @@ export async function run( const expectFailedSarifUpload = process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true"; + let uploadFailedSarifResult: UploadFailedSarifResult; + if (process.env[CODEQL_ACTION_ANALYZE_DID_UPLOAD_SARIF] !== "true") { try { - await uploadFailedSarif(config, repositoryNwo, featureEnablement, logger); + uploadFailedSarifResult = await uploadFailedSarif( + config, + repositoryNwo, + featureEnablement, + logger + ); } catch (e) { if (expectFailedSarifUpload) { throw new Error( @@ -104,11 +129,18 @@ export async function run( logger.info( `Failed to upload a SARIF file for the failed run. Error: ${e}` ); + uploadFailedSarifResult = { + upload_failed_run_error: e instanceof Error ? e.message : String(e), + }; } } else if (expectFailedSarifUpload) { throw new Error( "Expected to upload a SARIF file for the failed run, but didn't." ); + } else { + uploadFailedSarifResult = { + upload_failed_run_skipped_because: "SARIF file already uploaded", + }; } // Upload appropriate Actions artifacts for debugging @@ -121,4 +153,6 @@ export async function run( await printDebugLogs(config); } + + return uploadFailedSarifResult; } diff --git a/src/init-action-post.ts b/src/init-action-post.ts index f71512067e..8cf122233a 100644 --- a/src/init-action-post.ts +++ b/src/init-action-post.ts @@ -6,7 +6,14 @@ import * as core from "@actions/core"; -import * as actionsUtil from "./actions-util"; +import { + createStatusReportBase, + getActionsStatus, + getTemporaryDirectory, + printDebugLogs, + sendStatusReport, + StatusReportBase, +} from "./actions-util"; import { getGitHubVersion } from "./api-client"; import * as debugArtifacts from "./debug-artifacts"; import { Features } from "./feature-flags"; @@ -15,7 +22,15 @@ import { getActionsLogger } from "./logging"; import { parseRepositoryNwo } from "./repository"; import { checkGitHubVersionInRange, getRequiredEnvParam } from "./util"; +interface InitPostStatusReport + extends StatusReportBase, + initActionPostHelper.UploadFailedSarifResult {} + async function runWrapper() { + const startedAt = new Date(); + let uploadFailedSarifResult: + | initActionPostHelper.UploadFailedSarifResult + | undefined; try { const logger = getActionsLogger(); const gitHubVersion = await getGitHubVersion(); @@ -27,22 +42,45 @@ async function runWrapper() { const features = new Features( gitHubVersion, repositoryNwo, - actionsUtil.getTemporaryDirectory(), + getTemporaryDirectory(), logger ); - await initActionPostHelper.run( + uploadFailedSarifResult = await initActionPostHelper.run( debugArtifacts.uploadDatabaseBundleDebugArtifact, debugArtifacts.uploadLogsDebugArtifact, - actionsUtil.printDebugLogs, + printDebugLogs, repositoryNwo, features, logger ); - } catch (error) { - core.setFailed(`init post-action step failed: ${error}`); - console.log(error); + } catch (e) { + core.setFailed(e instanceof Error ? e.message : String(e)); + + console.log(e); + await sendStatusReport( + await createStatusReportBase( + "init-post", + getActionsStatus(e), + startedAt, + String(e), + e instanceof Error ? e.stack : undefined + ) + ); + return; } + const statusReportBase = await createStatusReportBase( + "init-post", + "success", + startedAt + ); + const statusReport: InitPostStatusReport = { + ...statusReportBase, + ...uploadFailedSarifResult, + }; + console.log("status report"); + console.log(statusReport); + await sendStatusReport(statusReport); } void runWrapper(); From a409f43c7ab85ec48ff4074fec7639744208a58f Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Thu, 8 Dec 2022 18:36:05 +0000 Subject: [PATCH 2/6] Handle non-string `with` inputs --- lib/workflow.js | 8 ++++---- lib/workflow.js.map | 2 +- src/workflow.ts | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/workflow.js b/lib/workflow.js index 84630781d3..13ae46036e 100644 --- a/lib/workflow.js +++ b/lib/workflow.js @@ -264,7 +264,7 @@ function getStepsCallingAction(job, actionName) { * determine that no such input is passed to the Action. */ function getInputOrThrow(workflow, jobName, actionName, inputName, matrixVars) { - var _a; + var _a, _b; const preamble = `Could not get ${inputName} input to ${actionName} since`; if (!workflow.jobs) { throw new Error(`${preamble} the workflow has no jobs.`); @@ -279,11 +279,11 @@ function getInputOrThrow(workflow, jobName, actionName, inputName, matrixVars) { else if (stepsCallingAction.length > 1) { throw new Error(`${preamble} the ${jobName} job calls ${actionName} multiple times.`); } - let input = (_a = stepsCallingAction[0].with) === null || _a === void 0 ? void 0 : _a[inputName]; + let input = (_b = (_a = stepsCallingAction[0].with) === null || _a === void 0 ? void 0 : _a[inputName]) === null || _b === void 0 ? void 0 : _b.toString(); if (input !== undefined && matrixVars !== undefined) { - // Make a basic attempt to substitute matrix variables - // First normalize by removing whitespace + // Normalize by removing whitespace input = input.replace(/\${{\s+/, "${{").replace(/\s+}}/, "}}"); + // Make a basic attempt to substitute matrix variables for (const [key, value] of Object.entries(matrixVars)) { input = input.replace(`\${{matrix.${key}}}`, value); } diff --git a/lib/workflow.js.map b/lib/workflow.js.map index 188abbda5f..e5cec74f6f 100644 --- a/lib/workflow.js.map +++ b/lib/workflow.js.map @@ -1 +1 @@ -{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../src/workflow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AACtC,8CAAgC;AAEhC,kDAAoC;AACpC,iCAA6C;AAoC7C,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC;AAC7C,CAAC;AAED,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC;AAE7C,SAAS,YAAY,CAAC,MAAM;IAC1B,OAAO,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC,oCAAoC;AAC5F,CAAC;AAED,SAAS,eAAe,CAAC,KAAK;IAC5B,OAAO,IAAI,MAAM,CACf,IAAI,KAAK;SACN,QAAQ,EAAE;SACV,KAAK,CAAC,YAAY,CAAC;SACnB,MAAM,CAAC,UAAU,GAAG,EAAE,GAAG;QACxB,IAAI,GAAG,KAAK,IAAI,EAAE;YAChB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACjB;aAAM,IAAI,GAAG,KAAK,GAAG,EAAE;YACtB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACpB;aAAM,IAAI,GAAG,EAAE;YACd,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,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,CAAC;AAED;;;;GAIG;AACH,SAAS,oBAAoB;IAC3B,IAAI,IAAA,0BAAmB,EAAC,mBAAmB,CAAC,KAAK,sBAAsB,EAAE;QACvE,OAAO,WAAW,CAAC;KACpB;SAAM;QACL,OAAO,8BAA8B,CAAC;KACvC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,uBAAuB,CACrC,QAAkB,EAClB,OAAe,EACf,UAAiD;IAEjD,OAAO,eAAe,CACpB,QAAQ,EACR,OAAO,EACP,oBAAoB,EAAE,EACtB,UAAU,EACV,UAAU,CACX,CAAC;AACJ,CAAC;AAZD,0DAYC;AAED;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,QAAkB,EAClB,OAAe,EACf,UAAiD;IAEjD,OAAO,CACL,eAAe,CACb,QAAQ,EACR,OAAO,EACP,oBAAoB,EAAE,EACtB,QAAQ,EACR,UAAU,CACX,IAAI,MAAM,CAAC,0CAA0C;KACvD,CAAC;AACJ,CAAC;AAdD,sDAcC;AAED;;;;;;;;GAQG;AACH,SAAgB,2BAA2B,CACzC,QAAkB,EAClB,OAAe,EACf,UAAiD;IAEjD,OAAO,CACL,eAAe,CACb,QAAQ,EACR,OAAO,EACP,oBAAoB,EAAE,EACtB,eAAe,EACf,UAAU,CACX,IAAI,IAAA,0BAAmB,EAAC,kBAAkB,CAAC,CAAC,oEAAoE;KAClH,CAAC;AACJ,CAAC;AAdD,kEAcC"} \ No newline at end of file diff --git a/src/workflow.ts b/src/workflow.ts index a681d07bf5..5cc611bcf0 100644 --- a/src/workflow.ts +++ b/src/workflow.ts @@ -11,7 +11,7 @@ export interface WorkflowJobStep { name?: string; run?: any; uses?: string; - with?: { [key: string]: string }; + with?: { [key: string]: boolean | number | string }; } interface WorkflowJob { @@ -350,12 +350,12 @@ function getInputOrThrow( ); } - let input = stepsCallingAction[0].with?.[inputName]; + let input = stepsCallingAction[0].with?.[inputName]?.toString(); if (input !== undefined && matrixVars !== undefined) { - // Make a basic attempt to substitute matrix variables - // First normalize by removing whitespace + // Normalize by removing whitespace input = input.replace(/\${{\s+/, "${{").replace(/\s+}}/, "}}"); + // Make a basic attempt to substitute matrix variables for (const [key, value] of Object.entries(matrixVars)) { input = input.replace(`\${{matrix.${key}}}`, value); } From dc9c1c1a512d194306b7db249b8a55b176c92d60 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Thu, 8 Dec 2022 18:39:09 +0000 Subject: [PATCH 3/6] Add regression test for `upload: false` --- lib/init-action-post-helper.test.js | 53 +++++++++++++-- lib/init-action-post-helper.test.js.map | 2 +- src/init-action-post-helper.test.ts | 89 +++++++++++++++++++------ 3 files changed, 116 insertions(+), 28 deletions(-) diff --git a/lib/init-action-post-helper.test.js b/lib/init-action-post-helper.test.js index 93f03a8831..7315fb3118 100644 --- a/lib/init-action-post-helper.test.js +++ b/lib/init-action-post-helper.test.js @@ -103,6 +103,38 @@ const workflow = __importStar(require("./workflow")); ]); await testFailedSarifUpload(t, actionsWorkflow, { category: "my-category" }); }); +(0, ava_1.default)("doesn't upload failed SARIF for workflow with upload: false", async (t) => { + const actionsWorkflow = createTestWorkflow([ + { + name: "Checkout repository", + uses: "actions/checkout@v3", + }, + { + name: "Initialize CodeQL", + uses: "github/codeql-action/init@v2", + with: { + languages: "javascript", + }, + }, + { + name: "Perform CodeQL Analysis", + uses: "github/codeql-action/analyze@v2", + with: { + category: "my-category", + upload: false, + }, + }, + ]); + await testFailedSarifUpload(t, actionsWorkflow, { + expectedLogs: [ + { + message: "Won't upload a failed SARIF file since SARIF upload is disabled.", + type: "debug", + }, + ], + expectUpload: false, + }); +}); (0, ava_1.default)("uploading failed SARIF run fails when workflow does not reference github/codeql-action", async (t) => { const actionsWorkflow = createTestWorkflow([ { @@ -132,7 +164,7 @@ function createTestWorkflow(steps) { }, }; } -async function testFailedSarifUpload(t, actionsWorkflow, { category } = {}) { +async function testFailedSarifUpload(t, actionsWorkflow, { category, expectedLogs = [], expectUpload = true, } = {}) { const config = { codeQLCmd: "codeql", debugMode: true, @@ -153,11 +185,18 @@ async function testFailedSarifUpload(t, actionsWorkflow, { category } = {}) { uploadFromActions.resolves({ sarifID: "42" }); const waitForProcessing = sinon.stub(uploadLib, "waitForProcessing"); await initActionPostHelper.uploadFailedSarif(config, (0, repository_1.parseRepositoryNwo)("github/codeql-action"), (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.UploadFailedSarifEnabled]), (0, testing_utils_1.getRecordingLogger)(messages)); - t.deepEqual(messages, []); - t.true(diagnosticsExportStub.calledOnceWith(sinon.match.string, category), `Actual args were: ${diagnosticsExportStub.args}`); - t.true(uploadFromActions.calledOnceWith(sinon.match.string, sinon.match.string, category, sinon.match.any), `Actual args were: ${uploadFromActions.args}`); - t.true(waitForProcessing.calledOnceWith(sinon.match.any, "42", sinon.match.any, { - isUnsuccessfulExecution: true, - })); + t.deepEqual(messages, expectedLogs); + if (expectUpload) { + t.true(diagnosticsExportStub.calledOnceWith(sinon.match.string, category), `Actual args were: ${diagnosticsExportStub.args}`); + t.true(uploadFromActions.calledOnceWith(sinon.match.string, sinon.match.string, category, sinon.match.any), `Actual args were: ${uploadFromActions.args}`); + t.true(waitForProcessing.calledOnceWith(sinon.match.any, "42", sinon.match.any, { + isUnsuccessfulExecution: true, + })); + } + else { + t.true(diagnosticsExportStub.notCalled); + t.true(uploadFromActions.notCalled); + t.true(waitForProcessing.notCalled); + } } //# sourceMappingURL=init-action-post-helper.test.js.map \ No newline at end of file diff --git a/lib/init-action-post-helper.test.js.map b/lib/init-action-post-helper.test.js.map index 6b440ee4f6..52ca618436 100644 --- a/lib/init-action-post-helper.test.js.map +++ b/lib/init-action-post-helper.test.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action-post-helper.test.js","sourceRoot":"","sources":["../src/init-action-post-helper.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA6C;AAC7C,6CAA+B;AAE/B,4DAA8C;AAC9C,iDAAmC;AACnC,4DAA8C;AAC9C,m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AAC,CAAC,EAClD,IAAA,kCAAkB,EAAC,QAAQ,CAAC,CAC7B,CAAC;IACF,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,IAAI,CACJ,qBAAqB,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,EAClE,qBAAqB,qBAAqB,CAAC,IAAI,EAAE,CAClD,CAAC;IACF,CAAC,CAAC,IAAI,CACJ,iBAAiB,CAAC,cAAc,CAC9B,KAAK,CAAC,KAAK,CAAC,MAAM,EAClB,KAAK,CAAC,KAAK,CAAC,MAAM,EAClB,QAAQ,EACR,KAAK,CAAC,KAAK,CAAC,GAAG,CAChB,EACD,qBAAqB,iBAAiB,CAAC,IAAI,EAAE,CAC9C,CAAC;IACF,CAAC,CAAC,IAAI,CACJ,iBAAiB,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE;QACvE,uBAAuB,EAAE,IAAI;KAC9B,CAAC,CACH,CAAC;AACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"init-action-post-helper.test.js","sourceRoot":"","sources":["../src/init-action-post-helper.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA6C;AAC7C,6CAA+B;AAE/B,4DAA8C;AAC9C,iDAAmC;AACnC,4DAA8C;AAC9C,mDAA0C;AAC1C,gFAAkE;AAClE,uCAA4C;AAC5C,6CAAkD;AAClD,mDAKyB;AACzB,wDAA0C;AAC1C,6CAA+B;AAC/B,qDAAuC;AAEvC,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,IAAA,aAAI,EAAC,uCAAuC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACxD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC5C,OAAO,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QACpC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;KACrC;AACH,CAAC"} \ No newline at end of file diff --git a/src/init-action-post-helper.test.ts b/src/init-action-post-helper.test.ts index 6d2d51d875..c860de46b6 100644 --- a/src/init-action-post-helper.test.ts +++ b/src/init-action-post-helper.test.ts @@ -11,6 +11,7 @@ import { parseRepositoryNwo } from "./repository"; import { createFeatures, getRecordingLogger, + LoggedMessage, setupTests, } from "./testing-utils"; import * as uploadLib from "./upload-lib"; @@ -111,6 +112,40 @@ test("uploads failed SARIF run for typical workflow", async (t) => { await testFailedSarifUpload(t, actionsWorkflow, { category: "my-category" }); }); +test("doesn't upload failed SARIF for workflow with upload: false", async (t) => { + const actionsWorkflow = createTestWorkflow([ + { + name: "Checkout repository", + uses: "actions/checkout@v3", + }, + { + name: "Initialize CodeQL", + uses: "github/codeql-action/init@v2", + with: { + languages: "javascript", + }, + }, + { + name: "Perform CodeQL Analysis", + uses: "github/codeql-action/analyze@v2", + with: { + category: "my-category", + upload: false, + }, + }, + ]); + await testFailedSarifUpload(t, actionsWorkflow, { + expectedLogs: [ + { + message: + "Won't upload a failed SARIF file since SARIF upload is disabled.", + type: "debug", + }, + ], + expectUpload: false, + }); +}); + test("uploading failed SARIF run fails when workflow does not reference github/codeql-action", async (t) => { const actionsWorkflow = createTestWorkflow([ { @@ -149,7 +184,15 @@ function createTestWorkflow( async function testFailedSarifUpload( t: ExecutionContext, actionsWorkflow: workflow.Workflow, - { category }: { category?: string } = {} + { + category, + expectedLogs = [], + expectUpload = true, + }: { + category?: string; + expectedLogs?: LoggedMessage[]; + expectUpload?: boolean; + } = {} ): Promise { const config = { codeQLCmd: "codeql", @@ -180,23 +223,29 @@ async function testFailedSarifUpload( createFeatures([Feature.UploadFailedSarifEnabled]), getRecordingLogger(messages) ); - t.deepEqual(messages, []); - t.true( - diagnosticsExportStub.calledOnceWith(sinon.match.string, category), - `Actual args were: ${diagnosticsExportStub.args}` - ); - t.true( - uploadFromActions.calledOnceWith( - sinon.match.string, - sinon.match.string, - category, - sinon.match.any - ), - `Actual args were: ${uploadFromActions.args}` - ); - t.true( - waitForProcessing.calledOnceWith(sinon.match.any, "42", sinon.match.any, { - isUnsuccessfulExecution: true, - }) - ); + t.deepEqual(messages, expectedLogs); + if (expectUpload) { + t.true( + diagnosticsExportStub.calledOnceWith(sinon.match.string, category), + `Actual args were: ${diagnosticsExportStub.args}` + ); + t.true( + uploadFromActions.calledOnceWith( + sinon.match.string, + sinon.match.string, + category, + sinon.match.any + ), + `Actual args were: ${uploadFromActions.args}` + ); + t.true( + waitForProcessing.calledOnceWith(sinon.match.any, "42", sinon.match.any, { + isUnsuccessfulExecution: true, + }) + ); + } else { + t.true(diagnosticsExportStub.notCalled); + t.true(uploadFromActions.notCalled); + t.true(waitForProcessing.notCalled); + } } From 118e294bb984b40c0d7fdec2bcc788f999723987 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Thu, 8 Dec 2022 19:01:20 +0000 Subject: [PATCH 4/6] Record the stack trace if applicable --- lib/init-action-post-helper.js | 33 +++++++------ lib/init-action-post-helper.js.map | 2 +- src/init-action-post-helper.ts | 75 +++++++++++++++++++++--------- 3 files changed, 73 insertions(+), 37 deletions(-) diff --git a/lib/init-action-post-helper.js b/lib/init-action-post-helper.js index 41e0a6fdfe..4fb47eb459 100644 --- a/lib/init-action-post-helper.js +++ b/lib/init-action-post-helper.js @@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.run = exports.uploadFailedSarif = void 0; +exports.run = exports.uploadSarifIfRunFailed = exports.uploadFailedSarif = void 0; const core = __importStar(require("@actions/core")); const actionsUtil = __importStar(require("./actions-util")); const codeql_1 = require("./codeql"); @@ -29,6 +29,12 @@ const shared_environment_1 = require("./shared-environment"); const uploadLib = __importStar(require("./upload-lib")); const util_1 = require("./util"); const workflow_1 = require("./workflow"); +function createFailedUploadFailedSarifResult(error) { + return { + upload_failed_run_error: error instanceof Error ? error.message : String(error), + upload_failed_run_stack_trace: error instanceof Error ? error.stack : undefined, + }; +} async function uploadFailedSarif(config, repositoryNwo, featureEnablement, logger) { var _a, _b; if (!config.codeQLCmd) { @@ -61,18 +67,12 @@ async function uploadFailedSarif(config, repositoryNwo, featureEnablement, logge }; } exports.uploadFailedSarif = uploadFailedSarif; -async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, printDebugLogs, repositoryNwo, featureEnablement, logger) { - const config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger); - if (config === undefined) { - logger.warning("Debugging artifacts are unavailable since the 'init' Action failed before it could produce any."); - return; - } +async function uploadSarifIfRunFailed(config, repositoryNwo, featureEnablement, logger) { // Environment variable used to integration test uploading a SARIF file for failed runs const expectFailedSarifUpload = process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true"; - let uploadFailedSarifResult; if (process.env[shared_environment_1.CODEQL_ACTION_ANALYZE_DID_UPLOAD_SARIF] !== "true") { try { - uploadFailedSarifResult = await uploadFailedSarif(config, repositoryNwo, featureEnablement, logger); + return await uploadFailedSarif(config, repositoryNwo, featureEnablement, logger); } catch (e) { if (expectFailedSarifUpload) { @@ -80,19 +80,26 @@ async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, p `the following error: ${e}`); } logger.info(`Failed to upload a SARIF file for the failed run. Error: ${e}`); - uploadFailedSarifResult = { - upload_failed_run_error: e instanceof Error ? e.message : String(e), - }; + return createFailedUploadFailedSarifResult(e); } } else if (expectFailedSarifUpload) { throw new Error("Expected to upload a SARIF file for the failed run, but didn't."); } else { - uploadFailedSarifResult = { + return { upload_failed_run_skipped_because: "SARIF file already uploaded", }; } +} +exports.uploadSarifIfRunFailed = uploadSarifIfRunFailed; +async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, printDebugLogs, repositoryNwo, featureEnablement, logger) { + const config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger); + if (config === undefined) { + logger.warning("Debugging artifacts are unavailable since the 'init' Action failed before it could produce any."); + return; + } + const uploadFailedSarifResult = await uploadSarifIfRunFailed(config, repositoryNwo, featureEnablement, logger); // Upload appropriate Actions artifacts for debugging if (config.debugMode) { core.info("Debug mode is on. Uploading available database bundles and logs as Actions debugging artifacts..."); diff --git a/lib/init-action-post-helper.js.map b/lib/init-action-post-helper.js.map index 5d431ef540..7356546d74 100644 --- a/lib/init-action-post-helper.js.map +++ b/lib/init-action-post-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action-post-helper.js","sourceRoot":"","sources":["../src/init-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,qCAAqC;AACrC,iDAAmD;AACnD,mDAA6D;AAG7D,6DAA8E;AAC9E,wDAA0C;AAC1C,iCAA6E;AAC7E,yCAKoB;AAcb,KAAK,UAAU,iBAAiB,CACrC,MAAc,EACd,aAA4B,EAC5B,iBAAoC,EACpC,MAAc;;IAEd,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;QACrB,MAAM,CAAC,OAAO,CACZ,+DAA+D,CAChE,CAAC;QACF,OAAO,EAAE,iCAAiC,EAAE,0BAA0B,EAAE,CAAC;KAC1E;IACD,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,IACE,CAAC,CAAC,MAAM,iBAAiB,CAAC,QAAQ,CAChC,uBAAO,CAAC,wBAAwB,EAChC,MAAM,CACP,CAAC,EACF;QACA,MAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACpD,OAAO,EAAE,iCAAiC,EAAE,kBAAkB,EAAE,CAAC;KAClE;IACD,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAW,GAAE,CAAC;IACrC,MAAM,OAAO,GAAG,IAAA,0BAAmB,EAAC,YAAY,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,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAlED,kBAkEC"} \ No newline at end of file +{"version":3,"file":"init-action-post-helper.js","sourceRoot":"","sources":["../src/init-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,qCAAqC;AACrC,iDAAmD;AACnD,mDAA6D;AAG7D,6DAA8E;AAC9E,wDAA0C;AAC1C,iCAA6E;AAC7E,yCAKoB;AAsBpB,SAAS,mCAAmC,CAC1C,KAAc;IAEd,OAAO;QACL,uBAAuB,EACrB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;QACxD,6BAA6B,EAC3B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;KACnD,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,iBAAiB,CACrC,MAAc,EACd,aAA4B,EAC5B,iBAAoC,EACpC,MAAc;;IAEd,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;QACrB,MAAM,CAAC,OAAO,CACZ,+DAA+D,CAChE,CAAC;QACF,OAAO,EAAE,iCAAiC,EAAE,0BAA0B,EAAE,CAAC;KAC1E;IACD,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,IACE,CAAC,CAAC,MAAM,iBAAiB,CAAC,QAAQ,CAChC,uBAAO,CAAC,wBAAwB,EAChC,MAAM,CACP,CAAC,EACF;QACA,MAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACpD,OAAO,EAAE,iCAAiC,EAAE,kBAAkB,EAAE,CAAC;KAClE;IACD,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAW,GAAE,CAAC;IACrC,MAAM,OAAO,GA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iC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAnCD,kBAmCC"} \ No newline at end of file diff --git a/src/init-action-post-helper.ts b/src/init-action-post-helper.ts index 90cb119484..7e014b93bf 100644 --- a/src/init-action-post-helper.ts +++ b/src/init-action-post-helper.ts @@ -17,17 +17,36 @@ import { } from "./workflow"; export interface UploadFailedSarifResult { - /** Size in bytes of the unzipped SARIF payload uploaded for the failed run. */ + /** + * If a SARIF file was uploaded for a failed run, this is the size in bytes of the unzipped + * SARIF payload. + */ upload_failed_run_raw_upload_size_bytes?: number; - /** Size in bytes of actual SARIF payload uploaded for the failed run. */ + /** + * If a SARIF file was uploaded for a failed run, this is the size in bytes of the actual + * zipped payload. + */ upload_failed_run_zipped_upload_size_bytes?: number; - /** Error encountered during uploading the failed run. */ + /** If there was an error while uploading a failed run, this is its message. */ upload_failed_run_error?: string; + /** If there was an error while uploading a failed run, this is its stack trace. */ + upload_failed_run_stack_trace?: string; /** Reason why we did not upload a SARIF payload with `executionSuccessful: false`. */ upload_failed_run_skipped_because?: string; } +function createFailedUploadFailedSarifResult( + error: unknown +): UploadFailedSarifResult { + return { + upload_failed_run_error: + error instanceof Error ? error.message : String(error), + upload_failed_run_stack_trace: + error instanceof Error ? error.stack : undefined, + }; +} + export async function uploadFailedSarif( config: Config, repositoryNwo: RepositoryNwo, @@ -89,31 +108,19 @@ export async function uploadFailedSarif( }; } -export async function run( - uploadDatabaseBundleDebugArtifact: Function, - uploadLogsDebugArtifact: Function, - printDebugLogs: Function, +export async function uploadSarifIfRunFailed( + config: Config, repositoryNwo: RepositoryNwo, featureEnablement: FeatureEnablement, logger: Logger -) { - const config = await getConfig(actionsUtil.getTemporaryDirectory(), logger); - if (config === undefined) { - logger.warning( - "Debugging artifacts are unavailable since the 'init' Action failed before it could produce any." - ); - return; - } - +): Promise { // Environment variable used to integration test uploading a SARIF file for failed runs const expectFailedSarifUpload = process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true"; - let uploadFailedSarifResult: UploadFailedSarifResult; - if (process.env[CODEQL_ACTION_ANALYZE_DID_UPLOAD_SARIF] !== "true") { try { - uploadFailedSarifResult = await uploadFailedSarif( + return await uploadFailedSarif( config, repositoryNwo, featureEnablement, @@ -129,19 +136,41 @@ export async function run( logger.info( `Failed to upload a SARIF file for the failed run. Error: ${e}` ); - uploadFailedSarifResult = { - upload_failed_run_error: e instanceof Error ? e.message : String(e), - }; + return createFailedUploadFailedSarifResult(e); } } else if (expectFailedSarifUpload) { throw new Error( "Expected to upload a SARIF file for the failed run, but didn't." ); } else { - uploadFailedSarifResult = { + return { upload_failed_run_skipped_because: "SARIF file already uploaded", }; } +} + +export async function run( + uploadDatabaseBundleDebugArtifact: Function, + uploadLogsDebugArtifact: Function, + printDebugLogs: Function, + repositoryNwo: RepositoryNwo, + featureEnablement: FeatureEnablement, + logger: Logger +) { + const config = await getConfig(actionsUtil.getTemporaryDirectory(), logger); + if (config === undefined) { + logger.warning( + "Debugging artifacts are unavailable since the 'init' Action failed before it could produce any." + ); + return; + } + + const uploadFailedSarifResult = await uploadSarifIfRunFailed( + config, + repositoryNwo, + featureEnablement, + logger + ); // Upload appropriate Actions artifacts for debugging if (config.debugMode) { From b7b875efff184017fd6ec63be41745ab382afac5 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 12 Dec 2022 17:54:33 +0000 Subject: [PATCH 5/6] Reuse existing fields in post-init status report --- lib/init-action-post-helper.js | 7 ++----- lib/init-action-post-helper.js.map | 2 +- src/init-action-post-helper.ts | 20 ++------------------ 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/lib/init-action-post-helper.js b/lib/init-action-post-helper.js index 4fb47eb459..e1d4ed0ddd 100644 --- a/lib/init-action-post-helper.js +++ b/lib/init-action-post-helper.js @@ -36,7 +36,7 @@ function createFailedUploadFailedSarifResult(error) { }; } async function uploadFailedSarif(config, repositoryNwo, featureEnablement, logger) { - var _a, _b; + var _a; if (!config.codeQLCmd) { logger.warning("CodeQL command not found. Unable to upload failed SARIF file."); return { upload_failed_run_skipped_because: "CodeQL command not found" }; @@ -61,10 +61,7 @@ async function uploadFailedSarif(config, repositoryNwo, featureEnablement, logge core.info(`Uploading failed SARIF file ${sarifFile}`); const uploadResult = await uploadLib.uploadFromActions(sarifFile, checkoutPath, category, logger); await uploadLib.waitForProcessing(repositoryNwo, uploadResult.sarifID, logger, { isUnsuccessfulExecution: true }); - return { - upload_failed_run_raw_upload_size_bytes: (_a = uploadResult === null || uploadResult === void 0 ? void 0 : uploadResult.statusReport) === null || _a === void 0 ? void 0 : _a.raw_upload_size_bytes, - upload_failed_run_zipped_upload_size_bytes: (_b = uploadResult === null || uploadResult === void 0 ? void 0 : uploadResult.statusReport) === null || _b === void 0 ? void 0 : _b.zipped_upload_size_bytes, - }; + return (_a = uploadResult === null || uploadResult === void 0 ? void 0 : uploadResult.statusReport) !== null && _a !== void 0 ? _a : {}; } exports.uploadFailedSarif = uploadFailedSarif; async function uploadSarifIfRunFailed(config, repositoryNwo, featureEnablement, logger) { diff --git a/lib/init-action-post-helper.js.map b/lib/init-action-post-helper.js.map index 7356546d74..a3fa3940e0 100644 --- a/lib/init-action-post-helper.js.map +++ b/lib/init-action-post-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action-post-helper.js","sourceRoot":"","sources":["../src/init-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,qCAAqC;AACrC,iDAAmD;AACnD,mDAA6D;AAG7D,6DAA8E;AAC9E,wDAA0C;AAC1C,iCAA6E;AAC7E,yCAKoB;AAsBpB,SAAS,mCAAmC,CAC1C,KAAc;IAEd,OAAO;QACL,uBAAuB,EACrB,KAAK,YAAY,KAAK,C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CAAC,IAAI,CACT,4DAA4D,CAAC,EAAE,CAChE,CAAC;YACF,OAAO,mCAAmC,CAAC,CAAC,CAAC,CAAC;SAC/C;KACF;SAAM,IAAI,uBAAuB,EAAE;QAClC,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;KACH;SAAM;QACL,OAAO;YACL,iCAAiC,EAAE,6BAA6B;SACjE,CAAC;KACH;AACH,CAAC;AAvCD,wDAuCC;AAEM,KAAK,UAAU,GAAG,CACvB,iCAA2C,EAC3C,uBAAiC,EACjC,cAAwB,EACxB,aAA4B,EAC5B,iBAAoC,EACpC,MAAc;IAEd,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAAC,WAAW,CAAC,qBAAqB,EAAE,EAAE,MAAM,CAAC,CAAC;IAC5E,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,MAAM,CAAC,OAAO,CACZ,iGAAiG,CAClG,CAAC;QACF,OAAO;KACR;IAED,MAAM,uBAAuB,GAAG,MAAM,sBAAsB,CAC1D,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,MAAM,CACP,CAAC;IAEF,qDAAqD;IACrD,IAAI,MAAM,CAAC,SAAS,EAAE;QACpB,IAAI,CAAC,IAAI,CACP,mGAAmG,CACpG,CAAC;QACF,MAAM,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAnCD,kBAmCC"} \ No newline at end of file +{"version":3,"file":"init-action-post-helper.js","sourceRoot":"","sources":["../src/init-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,qCAAqC;AACrC,iDAAmD;AACnD,mDAA6D;AAG7D,6DAA8E;AAC9E,wDAA0C;AAC1C,iCAA6E;AAC7E,yCA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,CAAC,EAAE,CAChE,CAAC;YACF,OAAO,mCAAmC,CAAC,CAAC,CAAC,CAAC;SAC/C;KACF;SAAM,IAAI,uBAAuB,EAAE;QAClC,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;KACH;SAAM;QACL,OAAO;YACL,iCAAiC,EAAE,6BAA6B;SACjE,CAAC;KACH;AACH,CAAC;AAvCD,wDAuCC;AAEM,KAAK,UAAU,GAAG,CACvB,iCAA2C,EAC3C,uBAAiC,EACjC,cAAwB,EACxB,aAA4B,EAC5B,iBAAoC,EACpC,MAAc;IAEd,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAAC,WAAW,CAAC,qBAAqB,EAAE,EAAE,MAAM,CAAC,CAAC;IAC5E,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,MAAM,CAAC,OAAO,CACZ,iGAAiG,CAClG,CAAC;QACF,OAAO;KACR;IAED,MAAM,uBAAuB,GAAG,MAAM,sBAAsB,CAC1D,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,MAAM,CACP,CAAC;IAEF,qDAAqD;IACrD,IAAI,MAAM,CAAC,SAAS,EAAE;QACpB,IAAI,CAAC,IAAI,CACP,mGAAmG,CACpG,CAAC;QACF,MAAM,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAnCD,kBAmCC"} \ No newline at end of file diff --git a/src/init-action-post-helper.ts b/src/init-action-post-helper.ts index 7e014b93bf..dabe191bce 100644 --- a/src/init-action-post-helper.ts +++ b/src/init-action-post-helper.ts @@ -16,18 +16,7 @@ import { getWorkflow, } from "./workflow"; -export interface UploadFailedSarifResult { - /** - * If a SARIF file was uploaded for a failed run, this is the size in bytes of the unzipped - * SARIF payload. - */ - upload_failed_run_raw_upload_size_bytes?: number; - /** - * If a SARIF file was uploaded for a failed run, this is the size in bytes of the actual - * zipped payload. - */ - upload_failed_run_zipped_upload_size_bytes?: number; - +export interface UploadFailedSarifResult extends uploadLib.UploadStatusReport { /** If there was an error while uploading a failed run, this is its message. */ upload_failed_run_error?: string; /** If there was an error while uploading a failed run, this is its stack trace. */ @@ -100,12 +89,7 @@ export async function uploadFailedSarif( logger, { isUnsuccessfulExecution: true } ); - return { - upload_failed_run_raw_upload_size_bytes: - uploadResult?.statusReport?.raw_upload_size_bytes, - upload_failed_run_zipped_upload_size_bytes: - uploadResult?.statusReport?.zipped_upload_size_bytes, - }; + return uploadResult?.statusReport ?? {}; } export async function uploadSarifIfRunFailed( From dd7c3ef80e9300ee54af3196a0dd0671537ebfd4 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 12 Dec 2022 17:59:20 +0000 Subject: [PATCH 6/6] Remove debugging log statements --- lib/init-action-post.js | 2 -- lib/init-action-post.js.map | 2 +- src/init-action-post.ts | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 090110b5e3..269666ef90 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -55,8 +55,6 @@ async function runWrapper() { ...statusReportBase, ...uploadFailedSarifResult, }; - console.log("status report"); - console.log(statusReport); await (0, actions_util_1.sendStatusReport)(statusReport); } void runWrapper(); diff --git a/lib/init-action-post.js.map b/lib/init-action-post.js.map index 54243b57ad..bf24f7fe18 100644 --- a/lib/init-action-post.js.map +++ b/lib/init-action-post.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action-post.js","sourceRoot":"","sources":["../src/init-action-post.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,iDAOwB;AACxB,6CAAgD;AAChD,kEAAoD;AACpD,mDAA2C;AAC3C,gFAAkE;AAClE,uCAA6C;AAC7C,6CAAkD;AAClD,iCAAwE;AAMxE,KAA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QACnB,GAAG,uBAAuB;KAC3B,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC7B,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1B,MAAM,IAAA,+BAAgB,EAAC,YAAY,CAAC,CAAC;AACvC,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"init-action-post.js","sourceRoot":"","sources":["../src/init-action-post.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,iDAOwB;AACxB,6CAAgD;AAChD,kEAAoD;AACpD,mDAA2C;AAC3C,gFAAkE;AAClE,uCAA6C;AAC7C,6CAAkD;AAClD,iCAAwE;AAMxE,KAAK,UAAU,UAAU;IACvB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,IAAI,uBAES,CAAC;IACd,IAAI;QACF,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;QAClC,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAEjD,MAAM,aAAa,GAAG,IAAA,+BAAkB,EACtC,IAAA,0BAAmB,EAAC,mBAAmB,CAAC,CACzC,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,wBAAQ,CAC3B,aAAa,EACb,aAAa,EACb,IAAA,oCAAqB,GAAE,EACvB,MAAM,CACP,CAAC;QAEF,uBAAuB,GAAG,MAAM,oBAAoB,CAAC,GAAG,CACtD,cAAc,CAAC,iCAAiC,EAChD,cAAc,CAAC,uBAAuB,EACtC,6BAAc,EACd,aAAa,EACb,QAAQ,EACR,MAAM,CACP,CAAC;KACH;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,SAAS,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAE3D,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACf,MAAM,IAAA,+BAAgB,EACpB,MAAM,IAAA,qCAAsB,EAC1B,WAAW,EACX,IAAA,+BAAgB,EAAC,CAAC,CAAC,EACnB,SAAS,EACT,MAAM,CAAC,CAAC,CAAC,EACT,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CACzC,CACF,CAAC;QACF,OAAO;KACR;IACD,MAAM,gBAAgB,GAAG,MAAM,IAAA,qCAAsB,EACnD,WAAW,EACX,SAAS,EACT,SAAS,CACV,CAAC;IACF,MAAM,YAAY,GAAyB;QACzC,GAAG,gBAAgB;QACnB,GAAG,uBAAuB;KAC3B,CAAC;IACF,MAAM,IAAA,+BAAgB,EAAC,YAAY,CAAC,CAAC;AACvC,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/src/init-action-post.ts b/src/init-action-post.ts index 8cf122233a..00481a42d0 100644 --- a/src/init-action-post.ts +++ b/src/init-action-post.ts @@ -78,8 +78,6 @@ async function runWrapper() { ...statusReportBase, ...uploadFailedSarifResult, }; - console.log("status report"); - console.log(statusReport); await sendStatusReport(statusReport); }