mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-18 07:25:58 +08:00
Merge pull request #1954 from actions/robherley/miss-msg
Cache miss as debug, not warning annotation
This commit is contained in:
commit
aad39a371f
@ -115,7 +115,6 @@ test('restore with restore keys and no cache found', async () => {
|
|||||||
const paths = ['node_modules']
|
const paths = ['node_modules']
|
||||||
const key = 'node-test'
|
const key = 'node-test'
|
||||||
const restoreKeys = ['node-']
|
const restoreKeys = ['node-']
|
||||||
const logWarningMock = jest.spyOn(core, 'warning')
|
|
||||||
|
|
||||||
jest
|
jest
|
||||||
.spyOn(CacheServiceClientJSON.prototype, 'GetCacheEntryDownloadURL')
|
.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)
|
const cacheKey = await restoreCache(paths, key, restoreKeys)
|
||||||
|
|
||||||
expect(cacheKey).toBe(undefined)
|
expect(cacheKey).toBe(undefined)
|
||||||
expect(logWarningMock).toHaveBeenCalledWith(
|
expect(logDebugMock).toHaveBeenCalledWith(
|
||||||
`Cache not found for keys: ${[key, ...restoreKeys].join(', ')}`
|
`Cache not found for keys: ${[key, ...restoreKeys].join(', ')}`
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
2
packages/cache/src/cache.ts
vendored
2
packages/cache/src/cache.ts
vendored
@ -256,7 +256,7 @@ async function restoreCacheV2(
|
|||||||
const response = await twirpClient.GetCacheEntryDownloadURL(request)
|
const response = await twirpClient.GetCacheEntryDownloadURL(request)
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
core.warning(`Cache not found for keys: ${keys.join(', ')}`)
|
core.debug(`Cache not found for keys: ${keys.join(', ')}`)
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user