Skip to content

Improve exception logging while publishing to blob storage#8134

Merged
michellemcdaniel merged 1 commit intodotnet:mainfrom
michellemcdaniel:addTryCatchPublish
Nov 5, 2021
Merged

Improve exception logging while publishing to blob storage#8134
michellemcdaniel merged 1 commit intodotnet:mainfrom
michellemcdaniel:addTryCatchPublish

Conversation

@michellemcdaniel
Copy link
Contributor

There can still be errors while uploading files to blob storage, even after confirming that the file doesn't already exist at the given location. See: https://dev.azure.com/dnceng/internal/_build/results?buildId=1443383&view=logs&j=8667c75e-c9c8-5a72-3326-7d35d151733c&t=648bbdf3-1356-5b63-95ae-560e1b5f90bf. Today, that exception is thrown, but since everything is async, it isn't clear what package was having an issue publishing.

This change adds a try/catch around the call to UploadAsync, and will long the file name and blob path along with the exception message if UploadAsync throws an exception.

To double check:

There can still be errors while uploading files to blob storage, even after confirming that the file doesn't already exist at the given location. See: https://dev.azure.com/dnceng/internal/_build/results?buildId=1443383&view=logs&j=8667c75e-c9c8-5a72-3326-7d35d151733c&t=648bbdf3-1356-5b63-95ae-560e1b5f90bf. Today, that exception is thrown, but since everything is async, it isn't clear what package was having an issue publishing.

This change adds a try/catch around the call to UploadAsync, and will long the file name and blob path along with the exception message if UploadAsync throws an exception.
@michellemcdaniel michellemcdaniel merged commit 3b953c8 into dotnet:main Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants