Skip to content

feat(services/s3): add R2 and MinIO presets - #8013

Merged
Xuanwo merged 14 commits into
mainfrom
xuanwo/s3-provider-presets
Nov 23, 2026
Merged

Xuanwo merged 14 commits into
mainfrom
xuanwo/s3-provider-presets

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Aug 2, 2026 •

Copy link
Copy Markdown
Member

Which issue does this PR close?

Part of #8003.

Rationale for this change

Cloudflare R2 and MinIO expose S3-compatible APIs, but each provider has a smaller configuration contract and distinct endpoint, region, and credential rules. Requiring users to configure them through the generic s3 service adds avoidable setup and exposes options that do not belong to those providers.

Dedicated presets provide provider-owned defaults and validation while continuing to share the S3 runtime. The generic s3 service remains the escape hatch for the complete S3 configuration surface.

What changes are included in this PR?

  • Add R2/R2Config and Minio/MinioConfig with dedicated r2:// and minio:// schemes.
  • Add independent services-r2 and services-minio facade features. Enabling services-s3 does not enable either preset.
  • Register the new schemes for URI and iterator construction while preserving direct builder construction.
  • Update generated Python, Java, and .NET configs, Python scheme stubs, service documentation, RFC 7948, and behavior-test planning and fixtures.
  • Keep generic S3 testing on Silo and run the MinIO presets against the pinned official MinIO release binary, with its SHA-256 verified at image build time.
  • Keep compatible_services.md as the guide for providers that still use the generic s3 service.

Are there any user-facing changes?

Yes. Rust users can enable only the provider they need and configure its smaller contract. R2 can derive its endpoint from account_id; MinIO requires its deployment endpoint and defaults the signing region to auto. Existing s3 configurations remain unchanged.

How was this change tested?

Main integration at e5fe148e4 (main 7ca9a9390):

  • S3 unit tests and doctests: 103 passed, 8 ignored. Independent facade registration passed with no service feature, S3 only, R2 only, and MinIO only.
  • Core workspace all-features/all-targets Clippy, repository Rust formatting, and diff checks passed.
  • Generator tests: 43 passed. Python, Java, website, and .NET generation completed; the new capability catalog reads the shared S3 runtime declaration for both presets. Planner tests: 23 passed.

Actual-service evidence from earlier revisions:

  • On 7bd65abc4, the official MinIO RELEASE.2024-09-22T00-33-43Z binary passed 129 behavior tests in each of authenticated and anonymous modes locally.
  • R2 cloud CI on a9837f398 passed 129 tests and failed four: two write/stat version-metadata mismatches and two multipart writes rejected because non-trailing parts had unequal lengths. These shared-runtime defects are explicitly deferred to separate work; this PR preserves the failing tests.
  • R2 fixture overrides for conditional copy/delete reflect observed service behavior. Runtime capability flags remain unchanged.

These actual-service results predate the latest main integration. R2 was not tested locally, and neither Docker Compose nor .NET compilation was validated locally on the latest head. Fresh CI provides current service coverage according to the repository's PR/nightly planning policy.

Breaking changes

None.

AI Usage Statement

  • Harness: OpenAI Codex. Model: GPT-5. Effort: not recorded in the historical handoff. Role: initial implementation and validation.
  • Harness: T3 Code through the Codex harness. Model: gpt-6-astra. Effort: high. Role: main integration, fixture and generated binding repairs, and local validation. Current service coverage and the deferred R2 runtime defects are described above.
  • Harness: T3 Code with Pi. Gemini 4 Neon (effort unspecified) reviewed maintainability and identified the missing S3 re-export. GPT-6.2-astra (high) verified and fixed the export and updated capability documentation generation to use each config’s source directory.

@github-actions github-actions Bot added releases-note/feat The PR implements a new feature or has a title that begins with "feat" services/s3 size:XXL This PR changes 1000+ lines, ignoring generated files. labels Nov 12, 2026
@Xuanwo
Xuanwo merged commit 7a2ea8d into main Nov 23, 2026
144 of 145 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/s3-provider-presets branch November 23, 2026 20:25
chitralverma added a commit to chitralverma/duckdb-opendal that referenced this pull request Nov 24, 2026
* feat: enable the minio and r2 services

- OpenDAL split MinIO and Cloudflare R2 out of s3 into presets with their
  own schemes (apache/opendal#8013, already in the pinned d3a9351). Enable
  services-minio and services-r2 in the default build.
- r2:// writes default to fixed 8 MiB parts: R2 rejects multipart uploads
  whose non-trailing parts differ in size.
- minio and r2 tiers reuse the s3 tier's MinIO stack via compose include;
  r2 points its endpoint at it.
- Guide in docs/services/minio-r2.md.

* test: build minio:// and r2:// operators through the FFI

* test: null-check the preset operator with as_ref (CodeQL rust/access-invalid-pointer)

* refactor: use human-units for size constants and parsing

- One `iec()` helper in config/value.rs replaces the `8 * 1024 * 1024`
  style constants in io.rs, table.rs and tests (cache.rs already had it).
- SI bytes, SI bits and IEC bits parse through human-units' `si_unit` /
  `iec_unit` derives instead of a hand-written factor table. Accepted
  formats are unchanged.

* chore: trim minio/r2 tests, comments and docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bindings/dotnet bindings/java bindings/python core releases-note/feat The PR implements a new feature or has a title that begins with "feat" services/s3 size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants