-
Notifications
You must be signed in to change notification settings - Fork 429
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
fix: aws credential resolving, reduce api calls #3107
Conversation
9ed9c10
to
f33c9af
Compare
4a61cc1
to
053601b
Compare
8cfc733
to
fd0dee3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3107 +/- ##
==========================================
+ Coverage 72.34% 72.39% +0.05%
==========================================
Files 128 128
Lines 41296 41302 +6
Branches 41296 41302 +6
==========================================
+ Hits 29875 29900 +25
+ Misses 9504 9500 -4
+ Partials 1917 1902 -15 ☔ View full report in Codecov by Sentry. |
fc5eca8
to
1424e57
Compare
crates/aws/src/storage.rs
Outdated
for (os_key, os_value) in std::env::vars_os() { | ||
if let (Some(key), Some(value)) = (os_key.to_str(), os_value.to_str()) { | ||
if let Ok(config_key) = AmazonS3ConfigKey::from_str(&key.to_ascii_lowercase()) { | ||
if !options.0.contains_key(config_key.as_ref()) { |
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.
look into the entry api for hashmaps you could simplify this code with it
https://doc.rust-lang.org/beta/std/collections/hash_map/struct.HashMap.html#method.entry
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.
I'll do that in a follow up!
…tion Signed-off-by: Ion Koutsouris <[email protected]>
Signed-off-by: R. Tyler Croy <[email protected]>
1424e57
to
829c720
Compare
Description
cc @rtyler