-
-
Notifications
You must be signed in to change notification settings - Fork 13
Upgrade SDK to 4.0 #316
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
base: main
Are you sure you want to change the base?
Upgrade SDK to 4.0 #316
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the AWS SDK to version 4.0 and adjusts the code to accommodate new API and language features.
- Updated credentials resolution to use DefaultAWSCredentialsIdentityResolver.
- Revised handling of nullable properties and updated JSON conversion methods.
- Adjusted collection initializers and null checks in file deletion and attribute parsing logic.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/Foundatio.AWS/Storage/S3FileStorage.cs | Updated credentials, fixed nullable LastModified handling, and modified delete request initialization. |
src/Foundatio.AWS/Queues/SQSQueue.cs | Updated credentials and modified redrive policy creation using JsonObject. |
src/Foundatio.AWS/Queues/AttributeExtensions.cs | Updated JSON parsing for RedrivePolicy and streamlined TryParse calls. |
src/Foundatio.AWS/Extensions/Extensions.cs | Updated FileSpec conversion logic to safely handle nullable properties. |
Files not reviewed (1)
- src/Foundatio.AWS/Foundatio.AWS.csproj: Language not supported
@@ -306,7 +307,7 @@ public async Task<bool> ExistsAsync(string path) | |||
const int PAGE_SIZE = 100; | |||
|
|||
var listRequest = new ListObjectsV2Request { BucketName = _bucket, Prefix = criteria.Prefix, MaxKeys = PAGE_SIZE }; | |||
var deleteRequest = new DeleteObjectsRequest { BucketName = _bucket }; | |||
var deleteRequest = new DeleteObjectsRequest { BucketName = _bucket, Objects = [] }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'Objects' property of DeleteObjectsRequest likely expects a list (e.g., List), but an empty array literal is used. Please initialize it with new List() to ensure compatibility with subsequent AddRange calls.
var deleteRequest = new DeleteObjectsRequest { BucketName = _bucket, Objects = [] }; | |
var deleteRequest = new DeleteObjectsRequest { BucketName = _bucket, Objects = new List<KeyVersion>() }; |
Copilot uses AI. Check for mistakes.
This is a work in progress wanted to see what all was breaking.
Logged some initial feedback here: aws/aws-sdk-net#3784