Skip to content

virtual_hosted_style_request=True needs the bucket in the endpoint — undocumented, and no error when it's missing #754

Description

@mscolnick

obstore 0.11.0, Python 3.13

obstore and boto3 interpret the endpoint differently in virtual-hosted mode:

boto3 (addressing_style="virtual") obstore (virtual_hosted_style_request=True)
endpoint you pass service root (https://cwobject.com) full bucket host (https://my-bucket.cwobject.com)
bucket host derived by client (prepends my-bucket.) caller

Coming from boto3, passing the service root is the natural thing to do:

store = S3Store(
    "my-bucket",
    endpoint="https://cwobject.com",  # service root, boto3-style
    virtual_hosted_style_request=True,
)
obstore.list(store).collect()

The bucket then appears nowhere in the request. This makes env-driven args for endpoint not-reusable (and currently not overridable #753)

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions