-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
ref: Migrate from rusoto
to aws-sdk-s3
#954
Conversation
I could not get a new Region struct to be created with v as its value, kept running into lifetime issues with value.
Perhaps something like this is needed to get HTTP status codes, as with S3WithCode(StatusCode, String).
Rusoto hardcoded the available regions, aws-sdk-rust does not. But there's no way to obtain the current list of valid regions without making API calls, which means having working credentials and either defaulting to some region (like us-east-1) or having the user specify a valid region anyway.
Unlike Rusoto, the Rust AWS SDK doesn't hardcode the currently known regions, and no validation is provided. API requests with invalid region names will fail.
rusoto
to aws-sdk-rust
rusoto
to aws-sdk-s3
Codecov ReportBase: 65.95% // Head: 66.05% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #954 +/- ##
==========================================
+ Coverage 65.95% 66.05% +0.09%
==========================================
Files 74 74
Lines 11754 11759 +5
==========================================
+ Hits 7752 7767 +15
+ Misses 4002 3992 -10
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Thanks for pulling this across the finish line, @Swatinem! I was just about to push my own updates to deal with the latest SDK, which included similar changes to the error handling. I hadn't gotten quite as far cleaning it up and handling all the necessary cases as needed but I was getting there, albeit slowly, and enjoying the learning process. Since the SDK isn't yet GA I figured there was still time to finish this PR, because it would have been nice to complete this myself. But I understand and appreciate your work to land this. |
I should have communicated the intent here better. We have already done a few refactors to all the downloader related things, and next up on that list would be to change the main downloader interface, in particular replacing |
No worries, @Swatinem. Had I known I would have pushed my changes for the latest AWS SDK sooner, because I spent several hours trying to understand and address the error handling changes. And I was on my way to clean them up, but granted it would have taken me way more time than you. ☺ I had planned to address the endpoint issue, too; I would have figured it out eventually but it would have taken me a while, due to my lack of experience and time to devote to this project. Given the refactoring you describe, merging this soon does seem like the right approach. |
Supercedes #849, CC @josb
Merges the latest changes from master, cleans up the error handling and adds back support for custom regions.
Fixes #575