From 3259ff2c2f97af68b1151ecdee28f3b3180973ed Mon Sep 17 00:00:00 2001 From: Rob Herley Date: Fri, 14 Feb 2025 09:28:01 -0500 Subject: [PATCH 1/2] cache miss as debug, not warning annotation --- src/cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cache.ts b/src/cache.ts index 9b02489..5f2102c 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -256,7 +256,7 @@ async function restoreCacheV2( const response = await twirpClient.GetCacheEntryDownloadURL(request) if (!response.ok) { - core.warning(`Cache not found for keys: ${keys.join(', ')}`) + core.debug(`Cache not found for keys: ${keys.join(', ')}`) return undefined } From 516a802ae752b55d9630a9307c3512f51a8ba428 Mon Sep 17 00:00:00 2001 From: Rob Herley Date: Fri, 14 Feb 2025 09:42:41 -0500 Subject: [PATCH 2/2] update mocks --- __tests__/restoreCacheV2.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/__tests__/restoreCacheV2.test.ts b/__tests__/restoreCacheV2.test.ts index d4edc2a..64e9df1 100644 --- a/__tests__/restoreCacheV2.test.ts +++ b/__tests__/restoreCacheV2.test.ts @@ -115,7 +115,6 @@ test('restore with restore keys and no cache found', async () => { const paths = ['node_modules'] const key = 'node-test' const restoreKeys = ['node-'] - const logWarningMock = jest.spyOn(core, 'warning') jest .spyOn(CacheServiceClientJSON.prototype, 'GetCacheEntryDownloadURL') @@ -130,7 +129,7 @@ test('restore with restore keys and no cache found', async () => { const cacheKey = await restoreCache(paths, key, restoreKeys) expect(cacheKey).toBe(undefined) - expect(logWarningMock).toHaveBeenCalledWith( + expect(logDebugMock).toHaveBeenCalledWith( `Cache not found for keys: ${[key, ...restoreKeys].join(', ')}` ) })