Skip to content

Commit 70b33c8

Browse files
committed
Rename function calls to make destructive operation clearer
1 parent 807b25c commit 70b33c8

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

lib/analyze-action.js

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/analyze-action.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
isCodeQualityEnabled,
2626
isCodeScanningEnabled,
2727
} from "./config-utils";
28-
import { uploadDatabases } from "./database-upload";
28+
import { uploadDatabases as cleanupAndUploadDatabases } from "./database-upload";
2929
import {
3030
DependencyCacheUploadStatusReport,
3131
uploadDependencyCaches,
@@ -35,7 +35,7 @@ import { EnvVar } from "./environment";
3535
import { Feature, Features } from "./feature-flags";
3636
import { KnownLanguage } from "./languages";
3737
import { getActionsLogger, Logger } from "./logging";
38-
import { uploadOverlayBaseDatabaseToCache } from "./overlay-database-utils";
38+
import { uploadOverlayBaseDatabaseToCache as cleanupAndUploadOverlayBaseDatabaseToCache } from "./overlay-database-utils";
3939
import { getRepositoryNwo } from "./repository";
4040
import * as statusReport from "./status-report";
4141
import {
@@ -417,12 +417,20 @@ async function run() {
417417
}
418418

419419
// Possibly upload the overlay-base database to actions cache.
420-
// If databases are to be uploaded, they will first be cleaned up at the overlay level.
421-
await uploadOverlayBaseDatabaseToCache(codeql, config, logger);
420+
// Note: Take care with the ordering of this call since databases may be cleaned up
421+
// at the `overlay` level.
422+
await cleanupAndUploadOverlayBaseDatabaseToCache(codeql, config, logger);
422423

423424
// Possibly upload the database bundles for remote queries.
424-
// If databases are to be uploaded, they will first be cleaned up at the clear level.
425-
await uploadDatabases(repositoryNwo, codeql, config, apiDetails, logger);
425+
// Note: Take care with the ordering of this call since databases may be cleaned up
426+
// at the `overlay` or `clear` level.
427+
await cleanupAndUploadDatabases(
428+
repositoryNwo,
429+
codeql,
430+
config,
431+
apiDetails,
432+
logger,
433+
);
426434

427435
// Possibly upload the TRAP caches for later re-use
428436
const trapCacheUploadStartTime = performance.now();

0 commit comments

Comments
 (0)