1
0
Fork 0

Remove finalize

pull/1700/head
Vallie Joseph 2024-03-28 18:14:40 +00:00
parent 97e4fcfcd5
commit f33a3f4748
2 changed files with 8 additions and 30 deletions

View File

@ -52,9 +52,7 @@ export async function uploadZipToBlobStorage(
zipUploadStream.pipe(hashStream).setEncoding('hex') // This stream is used to compute a hash of the zip content that gets used. Integrity check
core.info('Beginning upload of artifact content to blob storage')
try {
await new Promise((resolve, reject) => {
uploadStream.on('readable', async () => {
try {
await blockBlobClient.uploadStream(
uploadStream,
@ -62,12 +60,6 @@ export async function uploadZipToBlobStorage(
maxConcurrency,
options
)
resolve('success')
} catch (error) {
reject(error)
}
})
})
} catch (error) {
if (NetworkError.isNetworkErrorCode(error?.code)) {
throw new NetworkError(error?.code)
@ -75,20 +67,6 @@ export async function uploadZipToBlobStorage(
throw error
}
// try {
// await blockBlobClient.uploadStream(
// uploadStream,
// bufferSize,
// maxConcurrency,
// options
// )
// } catch (error) {
// if (NetworkError.isNetworkErrorCode(error?.code)) {
// throw new NetworkError(error?.code)
// }
// throw error
// }
core.info('Finished uploading artifact content to blob storage!')

View File

@ -63,7 +63,7 @@ export async function createZipUploadStream(
})
}
zip.finalize()
// zip.finalize()
const bufferSize = getUploadChunkSize()
const zipUploadStream = new ZipUploadStream(bufferSize)
core.debug(