1
0
Fork 0

Linter cleanups

pull/1857/head
Bassem Dghaidi 2024-11-14 03:34:13 -08:00 committed by GitHub
parent b2557ac90c
commit 19cdd5f210
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 17 deletions

View File

@ -84,7 +84,6 @@ export async function restoreCache(
checkPaths(paths) checkPaths(paths)
const cacheServiceVersion: string = config.getCacheServiceVersion() const cacheServiceVersion: string = config.getCacheServiceVersion()
console.debug(`Cache service version: ${cacheServiceVersion}`)
switch (cacheServiceVersion) { switch (cacheServiceVersion) {
case 'v2': case 'v2':
return await restoreCachev2( return await restoreCachev2(
@ -246,7 +245,7 @@ async function restoreCachev2(
workflowRunBackendId: backendIds.workflowRunBackendId, workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId, workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: primaryKey, key: primaryKey,
restoreKeys: restoreKeys, restoreKeys,
version: utils.getCacheVersion( version: utils.getCacheVersion(
paths, paths,
compressionMethod, compressionMethod,
@ -307,8 +306,6 @@ async function restoreCachev2(
core.debug(`Failed to delete archive: ${error}`) core.debug(`Failed to delete archive: ${error}`)
} }
} }
return undefined
} }
/** /**
@ -330,7 +327,6 @@ export async function saveCache(
checkKey(key) checkKey(key)
const cacheServiceVersion: string = config.getCacheServiceVersion() const cacheServiceVersion: string = config.getCacheServiceVersion()
console.debug(`Cache Service Version: ${cacheServiceVersion}`)
switch (cacheServiceVersion) { switch (cacheServiceVersion) {
case 'v2': case 'v2':
return await saveCachev2(paths, key, options, enableCrossOsArchive) return await saveCachev2(paths, key, options, enableCrossOsArchive)
@ -509,8 +505,8 @@ async function saveCachev2(
const request: CreateCacheEntryRequest = { const request: CreateCacheEntryRequest = {
workflowRunBackendId: backendIds.workflowRunBackendId, workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId, workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: key, key,
version: version version
} }
const response: CreateCacheEntryResponse = const response: CreateCacheEntryResponse =
await twirpClient.CreateCacheEntry(request) await twirpClient.CreateCacheEntry(request)
@ -526,8 +522,8 @@ async function saveCachev2(
const finalizeRequest: FinalizeCacheEntryUploadRequest = { const finalizeRequest: FinalizeCacheEntryUploadRequest = {
workflowRunBackendId: backendIds.workflowRunBackendId, workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId, workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: key, key,
version: version, version,
sizeBytes: `${archiveFileSize}` sizeBytes: `${archiveFileSize}`
} }