Don't try to upload cache if we have restored a cache with the same key

This commit is contained in:
Michael B. Gale
2025-11-14 12:10:38 +00:00
parent 594c0cc369
commit 51c9af3a3b
2 changed files with 17 additions and 3 deletions
+5 -1
View File
@@ -91155,6 +91155,11 @@ async function uploadDependencyCaches(codeql, features, config, logger) {
status.push({ language, result: "no-hash" /* NoHash */ });
continue;
}
const key = await cacheKey2(codeql, features, language, patterns);
if (config.dependencyCachingRestoredKeys.includes(key)) {
status.push({ language, result: "duplicate" /* Duplicate */ });
continue;
}
const size = await getTotalCacheSize(
cacheConfig.getDependencyPaths(),
logger,
@@ -91167,7 +91172,6 @@ async function uploadDependencyCaches(codeql, features, config, logger) {
);
continue;
}
const key = await cacheKey2(codeql, features, language, patterns);
logger.info(
`Uploading cache of size ${size} for ${language} with key ${key}...`
);