Uh oh!
There was an error while loading. Please reload this page.
GH-50126: [C++] Make S3Filesystem consume key-value options - #50128
GH-50126: [C++] Make S3Filesystem consume key-value options#50128raulcd wants to merge 11 commits into
Conversation
…umbing for ARROW_S3_MODULE to CI
There was a problem hiding this comment.
Pull request overview
This PR extends the C++ filesystem factory plumbing so FileSystemFromUri can pass backend-specific key/value options through to registered factories, and updates the S3 filesystem factory to actually consume a subset of those options (notably credentials) when constructing S3Options.
Changes:
- Thread backend-specific
std::anyoptions throughFileSystemFactory/FileSystemFromUriand add newFileSystemFromUrioverloads accepting options. - Add
S3Options::FromUriAndOptions(...)and update the S3 filesystem factory registration to use it. - Update/extend tests and CI/CMake so module tests are built and exercised when appropriate.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| cpp/src/arrow/testing/examplefs.cc | Updates the example filesystem factory to accept options and validate/consume them. |
| cpp/src/arrow/filesystem/s3fs.h | Adds S3Options::FromUriAndOptions declarations and includes needed for std::any. |
| cpp/src/arrow/filesystem/s3fs.cc | Implements FromUriAndOptions and wires S3 factory registration to consume options. |
| cpp/src/arrow/filesystem/s3fs_module_test.cc | Adds module-level test coverage around options passed to S3 via FileSystemFromUri. |
| cpp/src/arrow/filesystem/localfs_test.cc | Extends tests to validate options forwarding to dynamically loaded factories; adjusts registrar construction for nullptr cases. |
| cpp/src/arrow/filesystem/filesystem.h | Adds options-aware factory signature and new FileSystemFromUri overload declarations + docs. |
| cpp/src/arrow/filesystem/filesystem.cc | Plumbs options through the FileSystemFromUri* implementations and rejects options for non-factory schemes. |
| cpp/src/arrow/filesystem/filesystem_test.cc | Adds a test asserting non-factory schemes reject non-empty options. |
| cpp/src/arrow/filesystem/CMakeLists.txt | Gates s3fs_module_test on ARROW_BUILD_TESTS in addition to ARROW_S3_MODULE. |
| ci/scripts/cpp_build.sh | Ensures ARROW_S3_MODULE is consistently set/forwarded to CMake in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…f FileSystemFromUri, do not silently ignore non-empty options if underlying FS does not support them and use FileSystemFactoryOptions instead of std::vector<std::pair<std::string, std::any>> everywhere
… tests for FileSystemFromUriAndOptions and add a new one to test old behaviour
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fix linting after rebase Add s3 fs module test for FromUriAndOptionsCredentials and refactor S3Options::FromUri and S3Options::FromUriAndOptions Add tests for FromUriAndOptions credentials Add S3RetryStrategy to options Add option for default_metadata Minor fix
TBD once the PR is not on draft anymore
This is a follow up PR from #50044 currently only opened to exercise CI.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?
This PR includes breaking changes to public APIs. (If there are any breaking changes to public APIs, please explain which changes are breaking. If not, you can remove this.)
This PR contains a "Critical Fix". (If the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld), please provide explanation. If not, you can remove this.)