Repository navigation
fix(services/s3)!: resolve R2 and MinIO preset endpoints - #9632
Merged
Merged
Conversation
PsiACE
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #9545
Rationale for this change
A bucket name can match the first label of a MinIO hostname or the Cloudflare account label in an R2 endpoint. The preset then loses that label when the generic S3 builder interprets the hostname as already qualified with the bucket name.
What changes are included in this PR?
Use the preset connection builder for R2 and MinIO. It treats the endpoint as a base URL and preserves the port and proxy path when it adds the bucket. Align both configurations' Debug output with the other S3 presets by displaying the root and bucket. Model the required MinIO endpoint and lakeFS branch or reference root as strings.
On the official MinIO Community Edition
RELEASE.2024-09-22T00-33-43Z, the existing MinIO preset sent requests for bucketdataathttp://data.test:9000totest:9000. The candidate passed the existing object read and presigned read cases with the addressing option unset,false, andtrue. Each run could reach MinIO only through the expected hostname. R2 endpoint and signing checks ran offline. Earlier R2 and MinIO validation · R2 US jurisdiction checks · Earlier lakeFS gateway validationAre there any user-facing changes?
MinIO uses path-style addressing by default. Set
enable_virtual_host_style=truefor a deployment configured withMINIO_DOMAIN. Rust callers can pass a runtime boolean toMinio::enable_virtual_host_style(bool). R2 uses path-style addressing and the signing regionautofor derived and explicit endpoints.Breaking changes
Affected packages: core, bindings/c, bindings/cpp, bindings/dotnet, bindings/go, bindings/java, bindings/nodejs, bindings/ocaml, bindings/python, bindings/ruby, bindings/zig
Migration:
MinioConfig::endpointandLakefsS3Config::rootaStringin place ofSome(value). Begin the lakeFS root with a branch or reference, for exampledev/data.AI Usage Statement
magpie/codex/gpt-6.2-sol,max. Implemented and verified the change and drafted the PR. A separate reviewer using the same configuration reviewed the signed commit and checked the MinIO, R2, and generated configuration evidence.magpie/codex/gpt-6.2-astra,high. Analyzed the preset contracts and scoped the provider evidence.gemini-4-neon,high. Assessed the Rust addressing API and recommended the existing boolean setter convention.magpie/group/claude-opus-5.5,high. Settled the MinIO setter and its acceptance cases.magpie/codex/gpt-6.2-astra,xhigh. Set the implementation scope and service verification boundaries.