Skip to content

Commit aad39a3

Browse files
authored
Merge pull request #1954 from actions/robherley/miss-msg
Cache miss as debug, not warning annotation
2 parents 6a942b3 + 7fe619c commit aad39a3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/cache/__tests__/restoreCacheV2.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ test('restore with restore keys and no cache found', async () => {
115115
const paths = ['node_modules']
116116
const key = 'node-test'
117117
const restoreKeys = ['node-']
118-
const logWarningMock = jest.spyOn(core, 'warning')
119118

120119
jest
121120
.spyOn(CacheServiceClientJSON.prototype, 'GetCacheEntryDownloadURL')
@@ -130,7 +129,7 @@ test('restore with restore keys and no cache found', async () => {
130129
const cacheKey = await restoreCache(paths, key, restoreKeys)
131130

132131
expect(cacheKey).toBe(undefined)
133-
expect(logWarningMock).toHaveBeenCalledWith(
132+
expect(logDebugMock).toHaveBeenCalledWith(
134133
`Cache not found for keys: ${[key, ...restoreKeys].join(', ')}`
135134
)
136135
})

packages/cache/src/cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ async function restoreCacheV2(
256256
const response = await twirpClient.GetCacheEntryDownloadURL(request)
257257

258258
if (!response.ok) {
259-
core.warning(`Cache not found for keys: ${keys.join(', ')}`)
259+
core.debug(`Cache not found for keys: ${keys.join(', ')}`)
260260
return undefined
261261
}
262262

0 commit comments

Comments
 (0)