mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #23] [CLOSED] feat: support virtual-host addressing for S3-compatible snapshot back #125
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#125
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/23
Author: @davidmyriel
Created: 7/27/2026
Status: ❌ Closed
Base:
main← Head:myriel/tigris-data📝 Commits (6)
a36d945feat(oss): support configurable S3 addressing styleb54d04afix(oss): propagate addressing style to overlaybd remote layer reads70180d0fix(oss): harden smoke example and prove addressing override on the wire8221545test(oss): drop tigris smoke example, harden addressing wire test472f6ebUpdate storage/overlaybd/tests/oss_addressing_style.rsec6859eUpdate storage/overlaybd/tests/oss_addressing_style.rs📊 Changes
14 files changed (+375 additions, -7 deletions)
View changed files
📝
config/default.toml(+6 -0)📝
docs/src/configuration/reference.md(+13 -0)📝
docs/src/getting-started/on-demand-loading.md(+5 -0)📝
src/cfg.rs(+25 -0)📝
src/setup/deps.rs(+21 -1)📝
src/snapshot/repository/backends/oss/client.rs(+65 -1)📝
src/snapshot/repository/backends/oss/config.rs(+37 -3)📝
src/snapshot/repository/backends/oss/mod.rs(+1 -0)📝
src/snapshot/repository/backends/oss/repository.rs(+1 -0)📝
storage/overlaybd/src/backend/oss.rs(+85 -2)📝
storage/overlaybd/src/config.rs(+13 -0)➕
storage/overlaybd/tests/oss_addressing_style.rs(+100 -0)📝
storage/overlaybd/tests/oss_backend_minio.rs(+2 -0)📝
tests/snapshot_oss_e2e_test.rs(+1 -0)📄 Description
What problem does this solve?
I tried to point the OSS snapshot backend at an S3-compatible provider that requires virtual-host bucket addressing and found there was no way to make it work.
The backend picks the addressing style automatically in
detect_addressing_style: Alibaba OSS endpoints and endpoints that already contain the bucket name get virtual-host style (https://bucket.example.com/key), and everything else falls back to path style (https://example.com/bucket/key). That fallback is the problem — a growing set of providers only reliably support virtual-host addressing (AWS S3 buckets created after the path-style deprecation, Cloudflare R2, Tigris), and for those the auto-detection guesses wrong with no way to override it. The result is confusing request failures at runtime rather than anything that points at addressing style.What this PR does
Adds an optional
addressing_stylefield to[backend.oss]:The behavior is strictly opt-in:
detect_addressing_styleauto-detection runs exactly as before — zero behavior change for current Alibaba OSS / MinIO setups.The plumbing is small: a new
OssAddressingStyleconfig enum, a mapping inNormalizedOssConfig, and an override-or-detect resolution inOssClient::new.Testing
tigris_smokeexample, which drives the samebuild_object_store_operatorpath the backend uses: write → read-back → verify → delete round-trip succeeds withaddressing_style = "virtual".Host: bucket.endpointvs/bucket/keyon the path — so the override reaches the wire rather than being silently dropped.cargo fmt,cargo clippy -- -D warnings, andcargo test -p object-store-operatorare clean.Docs
docs/src/configuration/reference.md: new row in the[backend.oss]table plus a short worked example.docs/src/getting-started/on-demand-loading.md: one-line pointer after the OSS example config, since anyone following that guide with a virtual-host-only provider would otherwise hit an opaque failure.config/default.toml.Happy to drop the smoke example if you'd rather keep
examples/lean🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.