tustvold commented on code in PR #590:
URL:
https://github.com/apache/arrow-rs-object-store/pull/590#discussion_r2691772443
##########
src/aws/builder.rs:
##########
@@ -559,13 +565,23 @@ impl AmazonS3Builder {
pub fn from_env() -> Self {
let mut builder: Self = Default::default();
- 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 key.starts_with("AWS_") {
- if let Ok(config_key) = key.to_ascii_lowercase().parse() {
- builder = builder.with_config(config_key, value);
- }
- }
+ // Collect and sort environment variables to ensure deterministic
precedence.
Review Comment:
Can we instead add a separate config key for this + member variable, and
then implement this priority in the build method. Otherwise this behaviour
becomes specific to from_env and will break for methods that use with_config
directly - e.g. parse_url
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]