1
0
Fork 0

Add some debugging statements

pull/661/head
Yang Cao 2020-12-03 12:40:37 -05:00
parent 8ed9455d68
commit 05b1692026
2 changed files with 11 additions and 0 deletions

View File

@ -213,6 +213,11 @@ export class DownloadHttpClient {
!received || !received ||
process.env['ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION'] process.env['ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION']
) { ) {
if (process.env['ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION']) {
core.info(
'Skipping download validation since environment variable is set'
)
}
return true return true
} }
@ -231,6 +236,9 @@ export class DownloadHttpClient {
let response: IHttpClientResponse let response: IHttpClientResponse
try { try {
response = await makeDownloadRequest() response = await makeDownloadRequest()
if (core.isDebug()) {
displayHttpDiagnostics(response)
}
} catch (error) { } catch (error) {
// if an error is caught, it is usually indicative of a timeout so retry the download // if an error is caught, it is usually indicative of a timeout so retry the download
core.info('An error occurred while attempting to download a file') core.info('An error occurred while attempting to download a file')

View File

@ -305,6 +305,9 @@ export async function createEmptyFilesForArtifact(
export async function getFileSize(filePath: string): Promise<number> { export async function getFileSize(filePath: string): Promise<number> {
const stats = await fs.stat(filePath) const stats = await fs.stat(filePath)
debug(
`${filePath} size:(${stats.size}) blksize:(${stats.blksize}) blocks:(${stats.blocks})`
)
return stats.size return stats.size
} }