Skip to content

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

Closed as not planned

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.

Activity

  1. changed the title [-]StorageClientConfig.from_file ignore all options in implicit profile creation[/-] [+]StorageClientConfig.from_file ignores all options in implicit profile creation[/+] on Mar 19, 2026
  2. pavelgein commented on Mar 19, 2026

    @pavelgein
    Author
  3. commiterate commented on Mar 19, 2026

    @commiterate
    Contributor

    Reproduction with MSC 0.44.0: https://github.com/NVIDIA/multi-storage-client/tree/reproduction/19/reproduction

    This is currently intended behavior since multistorageclient.shortcuts.resolve_storage_client() (ref) doesn't know which profile to choose if the MSC config file looks like this:

    profiles:
      s3-profile:
        storage_provider:
          type: s3
          options:
            endpoint_url: https://my-endpoint.s3.com
            base_path: my-bucket
      s3-emulator-profile:
        storage_provider:
          type: s3
          options:
            endpoint_url: http://localhost:7070
            base_path: my-bucket

    From an s3://{bucket}/... URL, we only know the storage provider type (s3) and the bucket (which is used for the base_path). If we filtered profiles for that, we'd get back {"s3-profile", "s3-emulator-profile"}.

    Since there currently isn't a tie breaking method, the implicit profiles feature instead creates a separate profile with minimum options that can be inferred from the URL (e.g. _s3-my-bucket with type: s3 + options.base_path: my-bucket set. This implicit profile naming scheme may change in the future).

    Today users need to use msc://{profile name} instead to get an existing profile, so msc://s3-my-bucket/my_file.txt. The reproduction shows the differences in the resolved MSC storage clients.

  4. added a commit that references this issue on Mar 19, 2026
    a5aa2c9
  5. commiterate commented on Mar 19, 2026

    @commiterate
    Contributor

    Note that there's an existing path mapping feature that lets users map s3:// URLs to msc:// URLs so code can still continue to use s3:// URLs.

    https://nvidia.github.io/multi-storage-client/references/configuration.html#path-mapping

    Using the reproduction as the base, this would work:

    msc_bug.yaml

    profiles:
      s3-my-bucket:
        storage_provider:
          type: s3
          options:
            endpoint_url: https://my-endpoint.s3.com
            base_path: my-bucket
    path_mapping:
      s3://my-bucket/: msc://s3-my-bucket/
    $ just run
    # Prepare the virtual environment.
    uv sync --all-extras --python python
    Resolved 218 packages in 4ms
    Audited 32 packages in 1ms
    # Run the reproduction.
    MSC_CONFIG=msc_bug.yaml uv run msc_bug.py
    Resolving MSC client for msc://s3-my-bucket/my_file.txt...
    s3
    https://my-endpoint.s3.com
    my-bucket
    
    Resolving MSC client for s3://my-bucket/my_file.txt...
    s3
    https://my-endpoint.s3.com
    my-bucket

    A path mapping of s3://: msc://s3-no-base-path/, however, isn't supported yet.

  6. pavelgein commented on Mar 20, 2026

    @pavelgein
    Author

    Thanks, it works

  7. added theissue type on Apr 21, 2026
  8. added
    bugSomething isn't working
    and removed
    bugSomething isn't working
    on Apr 21, 2026
  9. removed theissue type on Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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