Troubleshoot

This commit is contained in:
Bassem Dghaidi authored and GitHub committed 2024-12-02 03:35:20 -08:00
1 parent f22a76997a
commit f51d6a5578
3 files changed
+48 -22

No files matched your search

+1
View File
@@ -561,6 +561,7 @@ async function saveCacheV2(
} else {
core.warning(`Failed to save: ${typedError.message}`)
}
throw error
} finally {
// Try to delete the archive to save space
try {
+23 -20
View File
@@ -140,27 +140,30 @@ export async function uploadCacheArchiveSDK(
onProgress: uploadProgress.onProgress()
}
// try {
uploadProgress.startDisplayTimer()
try {
uploadProgress.startDisplayTimer()
core.debug(
`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`
)
const response = await blockBlobClient.uploadFile(archivePath, uploadOptions)
// TODO: better management of non-retryable errors
if (response._response.status >= 400) {
throw new InvalidResponseError(
`Upload failed with status code ${response._response.status}`
core.debug(
`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`
)
}
return response
// } catch (error) {
// core.debug(`Error uploading cache archive: ${error}`)
// throw error
// } finally {
// uploadProgress.stopDisplayTimer()
// }
const response = await blockBlobClient.uploadFile(
archivePath,
uploadOptions
)
// TODO: better management of non-retryable errors
if (response._response.status >= 400) {
throw new InvalidResponseError(
`Upload failed with status code ${response._response.status}`
)
}
return response
} catch (error) {
core.debug(`Error uploading cache archive: ${error}`)
throw error
} finally {
uploadProgress.stopDisplayTimer()
}
}