You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2026/08/12 08:53:01 UTC
[I] Add a bucket-and-region constructor for S3 Express session configuration [opendal-reqsign]
Xuanwo opened a new issue, #834:
URL: https://github.com/apache/opendal-reqsign/issues/834
## Context
`S3ExpressSessionConfig::new` currently requires callers to provide `bucket`, `zone_id`, `region`, and `partition`. Both `zone_id` and `partition` are derived from the bucket and Region by private helpers that are already used by `S3ExpressSessionProvider`.
An external storage client therefore has to duplicate reqsign's directory-bucket naming, Zone/Region, partition, DNS-suffix, and Zonal-endpoint rules just to construct a validated config and use its endpoint. That creates two sources of truth for the same AWS wire contract.
## Proposed contract
Add an additive public constructor or resolver, for example:
```rust
S3ExpressSessionConfig::from_bucket(bucket, region) -> Result<Self>
```
The exact name is open to discussion. The API should:
- validate the complete `base--zone-id--x-s3` bucket name;
- extract the Zone ID from the bucket name;
- derive the AWS partition from the Region;
- validate that the Zone ID belongs to the configured Region;
- construct the correct Zonal endpoint and expose it through the existing getters;
- fail before credential loading or network I/O.
The existing explicit constructor can remain available when all components are already known.
## Acceptance criteria
- Standard AWS and AWS China buckets resolve to the correct DNS suffix.
- Explicit Region input supports Local Zones and newly introduced Zone prefixes without compatibility inference.
- Invalid bucket names and Zone/Region mismatches fail deterministically before I/O.
- Tests cover successful resolution and every validation boundary.
This allows consumers such as OpenDAL to treat the returned config as a reqsign-owned validated value instead of reimplementing AWS endpoint logic.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add a bucket-and-region constructor for S3 Express session configuration [opendal-reqsign]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed issue #834: Add a bucket-and-region constructor for S3 Express session configuration
URL: https://github.com/apache/opendal-reqsign/issues/834
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org