Skip to content

Support upper-case configuration options in parse_url_opts #529

Description

@christianbudgetthuis

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
When using the from_env function of the object store builders, environmental variables are expected to be upper-case, as is coventional. They are then converted to lower-case to be able to parse them as configuration options (see

if let Ok(config_key) = key.to_ascii_lowercase().parse() {
).

However, when using parse_url_opts the input is not converted to lower-case (see

|builder, (key, value)| match key.as_ref().parse() {
) but, of course, still needs to be lower-case as this is what the parse function expects. The documentation even recommends passing std::env::vars() to the parse_url_opts function, which does not work as expected if you are using upper-case environmental variables.

Describe the solution you'd like
Make parse_url_opts work with uppercase env. var names, e.g. add to_ascii_lowercase in the builder macro.

Describe alternatives you've considered
Add a note in the documentation that the configuration options need to be lower-case for parse_url_opts and uppercase when using from_env() functions for concrete object stores.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions