mirror of
https://github.com/github/codeql-action.git
synced 2026-04-17 04:23:16 +00:00
Override cleanup-level for overlay-base database
This commit is contained in:
@@ -39,6 +39,7 @@ test("analyze action with RAM & threads from environment variables", async (t) =
|
||||
};
|
||||
sinon.stub(configUtils, "getConfig").resolves({
|
||||
gitHubVersion,
|
||||
augmentationProperties: {},
|
||||
languages: [],
|
||||
packs: [],
|
||||
trapCaches: {},
|
||||
|
||||
@@ -37,6 +37,7 @@ test("analyze action with RAM & threads from action inputs", async (t) => {
|
||||
};
|
||||
sinon.stub(configUtils, "getConfig").resolves({
|
||||
gitHubVersion,
|
||||
augmentationProperties: {},
|
||||
languages: [],
|
||||
packs: [],
|
||||
trapCaches: {},
|
||||
|
||||
@@ -27,7 +27,10 @@ import { EnvVar } from "./environment";
|
||||
import { Features } from "./feature-flags";
|
||||
import { Language } from "./languages";
|
||||
import { getActionsLogger, Logger } from "./logging";
|
||||
import { uploadOverlayBaseDatabaseToCache } from "./overlay-database-utils";
|
||||
import {
|
||||
OverlayDatabaseMode,
|
||||
uploadOverlayBaseDatabaseToCache,
|
||||
} from "./overlay-database-utils";
|
||||
import { getRepositoryNwo } from "./repository";
|
||||
import * as statusReport from "./status-report";
|
||||
import {
|
||||
@@ -292,8 +295,15 @@ async function run() {
|
||||
logger,
|
||||
);
|
||||
|
||||
// An overlay-base database should always use the 'overlay' cleanup level
|
||||
// to preserve the cached intermediate results.
|
||||
//
|
||||
// Note that we may be overriding the 'cleanup-level' input parameter.
|
||||
const cleanupLevel =
|
||||
actionsUtil.getOptionalInput("cleanup-level") || "brutal";
|
||||
config.augmentationProperties.overlayDatabaseMode ===
|
||||
OverlayDatabaseMode.OverlayBase
|
||||
? "overlay"
|
||||
: actionsUtil.getOptionalInput("cleanup-level") || "brutal";
|
||||
|
||||
if (actionsUtil.getRequiredInput("skip-queries") !== "true") {
|
||||
runStats = await runQueries(
|
||||
|
||||
Reference in New Issue
Block a user