-
Notifications
You must be signed in to change notification settings - Fork 921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Azure SDK to upload files to Azure Blob #3033
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TingluoHuang
reviewed
Jan 2, 2024
c094e1e
to
037cf99
Compare
…runtime assets file
2f85a74
to
f1514c3
Compare
TingluoHuang
reviewed
Jan 8, 2024
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
TingluoHuang
reviewed
Jan 8, 2024
TingluoHuang
reviewed
Jan 8, 2024
TingluoHuang
reviewed
Jan 8, 2024
TingluoHuang
previously approved these changes
Jan 8, 2024
TingluoHuang
approved these changes
Jan 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request changes
ResultsHttpClient.cs
to use Azure Storage Blobs SDK to upload logs and summaries.This allows us to control
timeout
andretries
independently since we were using the same http layer for both communications to results service and Azure blob storage. Now we can rely on the SDK to manage details such as headers and query params.Using Azure specific SDK means we need to add additional logic for other blob providers down the road. This is an acceptable tradeoff.
Here are the most important changes:
Integration of Azure Storage Blobs SDK:
src/Sdk/Sdk.csproj
: Added a package reference to the Azure Storage Blobs SDK.src/Sdk/WebApi/WebApi/ResultsHttpClient.cs
: Imported the Azure Storage Blobs SDK namespaces.Refactoring of methods for uploading files to Azure Blob Storage:
src/Sdk/WebApi/WebApi/ResultsHttpClient.cs
: Replaced the HTTP request-based file upload methods with methods that use the Azure Storage Blobs SDK. This includes changes toUploadBlockFileAsync
,CreateAppendFileAsync
, andUploadAppendFileAsync
.src/Sdk/WebApi/WebApi/ResultsHttpClient.cs
: Removed constants related to Azure Blob Storage headers.