Skip to content

Commit

Permalink
Adding concurrency and upload response logs
Browse files Browse the repository at this point in the history
  • Loading branch information
vmjoseph committed Mar 28, 2024
1 parent d2d6999 commit 31a6086
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
12 changes: 6 additions & 6 deletions packages/artifact/src/internal/upload/blob-upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ export async function uploadZipToBlobStorage(
core.info(`is the upload stream closed? ${uploadStream.closed}`)
core.info(`is the upload stream readable? ${uploadStream.readable}`)
core.info(`is the upload stream writable? ${uploadStream.writable}`)
core.info(`are we exceeding the max concurrency? ${maxConcurrency}`)
try {
core.info(
'1 Even more beginning upload of artifact content to blob storage'
)
await blockBlobClient.uploadStream(
uploadStream,
bufferSize,
maxConcurrency,
options
)
await blockBlobClient
.uploadStream(uploadStream, bufferSize, maxConcurrency, options)
.then(response => {
core.info(`Upload stream response: ${response}`)
})
core.info(
'2 Even more beginning upload of artifact content to blob storage'
)
Expand Down
16 changes: 10 additions & 6 deletions packages/artifact/src/internal/upload/zip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,22 @@ export async function createZipUploadStream(
createReadStream(file.sourcePath),
{name: file.destinationPath},
function (err, entry) {
core.debug(`Entry is: ${entry}`)
core.info(`Entry is: ${entry}`)
if (err) reject(err)
else resolve(entry)
}
)
} else {
// add directory to zip
zip.entry(null, {name: file.destinationPath}, function (err, entry) {
core.debug(`Entry is: ${entry}`)
if (err) reject(err)
else resolve(entry)
})
zip.entry(
null,
{name: `${file.destinationPath}/`},
function (err, entry) {
core.info(`Entry is: ${entry}`)
if (err) reject(err)
else resolve(entry)
}
)
}
})
}
Expand Down

0 comments on commit 31a6086

Please sign in to comment.