Skip to content

StorageClientConfig.from_file ignores all options in implicit profile creation #19

@pavelgein

Description

@pavelgein

Summary

Subject

Steps to Reproduce

  1. Create a config file named msc_bug.yaml
profiles:
    s3-my-bucket:
        storage_provider:
            type: s3
            options:
                endpoint_url: https://my-endpoint.s3.com
                base_path: my-bucket
  1. Create a script named msc_bug.py
import multistorageclient as msc


def main():
    client, _ = msc.resolve_storage_client("s3://my-bucket/my_file.txt")
    assert client._storage_provider._endpoint_url == "https://my-endpoint.s3.com", f"{client._storage_provider._endpoint_url=}"

if __name__ == "__main__":
    main()
  1. Run
MSC_MSC_CONFIG=msc_bug.yaml python msc_bug.py 

Environment Details

  • MultiStorageClient version
  • Operating system and version
  • Python version

Expected Behaviour

Url, as well as all other options, should be passed

Additional Context

Add any other context or screenshots about the bug here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions