From ccfa36f304056fb24583eecf03e14cdbe334bec3 Mon Sep 17 00:00:00 2001 From: Sampark Sharma Date: Wed, 21 Dec 2022 10:24:52 +0000 Subject: [PATCH] Address review comments --- packages/cache/src/internal/cacheHttpClient.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cache/src/internal/cacheHttpClient.ts b/packages/cache/src/internal/cacheHttpClient.ts index 14a25803..8f42c7db 100644 --- a/packages/cache/src/internal/cacheHttpClient.ts +++ b/packages/cache/src/internal/cacheHttpClient.ts @@ -107,7 +107,7 @@ export async function getCacheEntry( if (response.statusCode === 204) { // List cache for primary key only if cache miss occurs if (core.isDebug()) { - await listCache(keys[0], httpClient, version) + await printCachesListForDiagnostics(keys[0], httpClient, version) } return null } @@ -127,7 +127,7 @@ export async function getCacheEntry( return cacheResult } -async function listCache( +async function printCachesListForDiagnostics( key: string, httpClient: HttpClient, version: string @@ -143,7 +143,7 @@ async function listCache( core.debug( `No matching cache found for cache key '${key}', version '${version} and scope ${process.env['GITHUB_REF']} but there are ${totalCount} existing version of the cache for this key. More info on versioning can be found here: https://github.com/actions/cache#cache-version \nOther versions are as follows:` ) - for (const cacheEntry of cacheListResult?.artifactCaches || []) { + for (const cacheEntry of cacheListResult.artifactCaches || []) { core.debug( `Cache Key: ${cacheEntry?.cacheKey}, Cache Version: ${cacheEntry?.cacheVersion}, Cache Scope: ${cacheEntry?.scope}, Cache Created: ${cacheEntry?.creationTime}` )