Merge pull request #1954 from actions/robherley/miss-msg

Cache miss as debug, not warning annotation
This commit is contained in:
Rob Herley 2025-02-14 10:58:45 -05:00 committed by GitHub
commit aad39a371f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -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(', ')}`
)
})

View File

@ -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
}