Log key and ref for which we're retrieving caches
This commit is contained in:
parent
0b4214972e
commit
1bea17f717
6 changed files with 14 additions and 7 deletions
6
lib/trap-caching.js
generated
6
lib/trap-caching.js
generated
|
|
@ -138,7 +138,7 @@ async function cleanupTrapCaches(config, logger) {
|
|||
try {
|
||||
for (const language of config.languages) {
|
||||
if (config.trapCaches[language]) {
|
||||
const matchingCaches = await getTrapCachesForLanguage(language);
|
||||
const matchingCaches = await getTrapCachesForLanguage(language, logger);
|
||||
for (const cache of matchingCaches) {
|
||||
logger.info(`Matched Actions cache ${JSON.stringify(cache)}`);
|
||||
}
|
||||
|
|
@ -150,8 +150,8 @@ async function cleanupTrapCaches(config, logger) {
|
|||
}
|
||||
}
|
||||
exports.cleanupTrapCaches = cleanupTrapCaches;
|
||||
async function getTrapCachesForLanguage(language) {
|
||||
const allCaches = await apiClient.listActionsCaches(CODEQL_TRAP_CACHE_PREFIX, await actionsUtil.getRef());
|
||||
async function getTrapCachesForLanguage(language, logger) {
|
||||
const allCaches = await apiClient.listActionsCaches(CODEQL_TRAP_CACHE_PREFIX, await actionsUtil.getRef(), logger);
|
||||
return allCaches.filter((cache) => {
|
||||
return cache.key?.includes(`-${language}-`);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue