developmentseed / developmentseed/obstore
`virtual_hosted_style_request=True` needs the bucket in the endpoint — undocumented, and no error when it's missing
- Dominant language
- Python
- Stars
- 810
- Forks
- 42
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 6
Description
**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:
```python
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 https://github.com/developmentseed/obstore/issues/753)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Python S3Store endpoint handling and the obstore.list(store) request path described in the issue; compare virtual-hosted behavior with boto3's addressing style. Done means the bucket is present in requests when given a service-root endpoint, or a clear error explains the required full bucket host, with the undocumented behavior covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100