1
0
Fork 0

Add the download cache file status code to debug log

pull/1876/head
Bassem Dghaidi 2024-11-25 07:34:52 -08:00 committed by GitHub
parent 0e321b26f4
commit 4d31e1048a
1 changed files with 13 additions and 10 deletions

View File

@ -3,18 +3,18 @@ import * as path from 'path'
import * as utils from './internal/cacheUtils'
import * as cacheHttpClient from './internal/cacheHttpClient'
import * as cacheTwirpClient from './internal/shared/cacheTwirpClient'
import { getCacheServiceVersion, isGhes } from './internal/config'
import { DownloadOptions, UploadOptions } from './options'
import { createTar, extractTar, listTar } from './internal/tar'
import {getCacheServiceVersion, isGhes} from './internal/config'
import {DownloadOptions, UploadOptions} from './options'
import {createTar, extractTar, listTar} from './internal/tar'
import {
CreateCacheEntryRequest,
FinalizeCacheEntryUploadRequest,
FinalizeCacheEntryUploadResponse,
GetCacheEntryDownloadURLRequest
} from './generated/results/api/v1/cache'
import { CacheFileSizeLimit } from './internal/constants'
import { uploadCacheFile } from './internal/blob/upload-cache'
import { downloadCacheFile } from './internal/blob/download-cache'
import {CacheFileSizeLimit} from './internal/constants'
import {uploadCacheFile} from './internal/blob/upload-cache'
import {downloadCacheFile} from './internal/blob/download-cache'
export class ValidationError extends Error {
constructor(message: string) {
super(message)
@ -271,7 +271,10 @@ async function restoreCacheV2(
core.debug(`Archive path: ${archivePath}`)
core.debug(`Starting download of archive to: ${archivePath}`)
const downloadResponse = await downloadCacheFile(response.signedDownloadUrl, archivePath)
const downloadResponse = await downloadCacheFile(
response.signedDownloadUrl,
archivePath
)
core.debug(`Download response status: ${downloadResponse._response.status}`)
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath)