From d8d73c0e76d558228c90f38c8c374dc0bfbbead1 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 12 Jun 2024 14:51:03 +0100 Subject: [PATCH] Clean up DB cluster directory at the end of each job --- lib/init-action-post-helper.js | 12 ++++++++++++ lib/init-action-post-helper.js.map | 2 +- src/init-action-post-helper.ts | 15 +++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/lib/init-action-post-helper.js b/lib/init-action-post-helper.js index ac079d77e8..2b82ce942e 100644 --- a/lib/init-action-post-helper.js +++ b/lib/init-action-post-helper.js @@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getFinalJobStatus = exports.run = exports.tryUploadSarifIfRunFailed = void 0; +const fs = __importStar(require("fs")); const core = __importStar(require("@actions/core")); const github = __importStar(require("@actions/github")); const actionsUtil = __importStar(require("./actions-util")); @@ -134,6 +135,17 @@ async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, p await uploadLogsDebugArtifact(config); await printDebugLogs(config); } + try { + fs.rmSync(config.dbLocation, { + recursive: true, + force: true, + maxRetries: 3, + }); + logger.info(`Cleaned up database cluster directory ${config.dbLocation}.`); + } + catch (e) { + logger.warning(`Failed to clean up database cluster directory ${config.dbLocation}. Details: ${e}`); + } return uploadFailedSarifResult; } exports.run = run; diff --git a/lib/init-action-post-helper.js.map b/lib/init-action-post-helper.js.map index 80e34daa91..c55f0e1fb5 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;AACtC,wDAA0C;AAE1C,4DAA8C;AAC9C,6CAA4C;AAC5C,qCAAqC;AAErC,+CAAuC;AACvC,mDAA6D;AAE7D,6CAAiE;AACjE,mDAA4C;AAC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AM,CAAC,QAAQ,EAAE,CAAC;QACpB,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,OAAO,CACZ,2HAA2H,CAC5H,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB;IAC/B,MAAM,wBAAwB,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,UAAU,CAAC,CAAC;IAChE,IACE,CAAC,wBAAwB;QACzB,CAAC,MAAM,CAAC,MAAM,CAAC,yBAAS,CAAC,CAAC,QAAQ,CAAC,wBAAqC,CAAC,EACzE,CAAC;QACD,OAAO,yBAAS,CAAC,aAAa,CAAC;IACjC,CAAC;IACD,OAAO,wBAAqC,CAAC;AAC/C,CAAC;AATD,8CASC"} \ 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,uCAAyB;AAEzB,oDAAsC;AACtC,wDAA0C;AAE1C,4DAA8C;AAC9C,6CAA4C;AAC5C,qCAAqC;AAErC,+CAAuC;AACvC,mDAA6D;AAE7D,6CAAiE;AACjE,mDAA4C;AAC5C,wDAA0C;AAC1C,iCAOgB;AAChB,yCAKoB;AAkBpB,SAAS,mCAAmC,CAC1C,KAAc;IAEd,MAAM,YAAY,GAAG,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC;IACtC,OAAO;QACL,uBAAuB,EAAE,YAAY,CAAC,OAAO;QAC7C,6BAA6B,EAAE,YAAY,CAAC,KAAK;KAClD,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,sBAAsB,CACnC,MAAc,EACd,aAA4B,EAC5B,QAA2B,EAC3B,MAAc;IAEd,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QACtB,OAAO,EAAE,iCAAiC,EAAE,0BAA0B,EAAE,CAAC;IAC3E,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,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J,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB;IAC/B,MAAM,wBAAwB,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,UAAU,CAAC,CAAC;IAChE,IACE,CAAC,wBAAwB;QACzB,CAAC,MAAM,CAAC,MAAM,CAAC,yBAAS,CAAC,CAAC,QAAQ,CAAC,wBAAqC,CAAC,EACzE,CAAC;QACD,OAAO,yBAAS,CAAC,aAAa,CAAC;IACjC,CAAC;IACD,OAAO,wBAAqC,CAAC;AAC/C,CAAC;AATD,8CASC"} \ No newline at end of file diff --git a/src/init-action-post-helper.ts b/src/init-action-post-helper.ts index 3d9a7e8f78..4242464aa1 100644 --- a/src/init-action-post-helper.ts +++ b/src/init-action-post-helper.ts @@ -1,3 +1,5 @@ +import * as fs from "fs"; + import * as core from "@actions/core"; import * as github from "@actions/github"; @@ -217,6 +219,19 @@ export async function run( await printDebugLogs(config); } + try { + fs.rmSync(config.dbLocation, { + recursive: true, + force: true, + maxRetries: 3, + }); + logger.info(`Cleaned up database cluster directory ${config.dbLocation}.`); + } catch (e) { + logger.warning( + `Failed to clean up database cluster directory ${config.dbLocation}. Details: ${e}`, + ); + } + return uploadFailedSarifResult; }