Ankitraj-builds opened a new pull request, #4134: URL: https://github.com/apache/iceberg-python/pull/4134
Closes #3888 # Rationale for this change REST catalogs like Lakekeeper always return remote signing settings (`s3.signer`, `s3.signer.uri`) in the table response config. Since #3956 the FileIO property order is table metadata < catalog config < server config < vended credentials, so the server's signer always wins. A client that has direct S3 credentials cannot turn remote signing off, and every S3 request pays an extra round trip to the signer. This change lets the user opt out explicitly: if the catalog config sets `s3.signer` to an empty string, that value is applied after the server config in `RestCatalog._load_file_io()`. Only an explicit empty value does this. If `s3.signer` is not set in the catalog config, or set to a real signer, the current order is unchanged. Because the check is in `_load_file_io()`, it covers `Table`, `StagedTable` and scan planning FileIOs. # Are these changes tested? Yes. Added two tests in `tests/catalog/test_rest.py`: - `test_load_table_empty_catalog_signer_disables_remote_signing`: the server returns `s3.signer: S3V4RestSigner`, the catalog sets `s3.signer` to `""`, and the table FileIO gets `""`. This test fails on `main`. - `test_load_table_server_signer_kept_without_catalog_override`: same server response with no catalog override, and the server signer is kept. All 176 tests in `tests/catalog/test_rest.py` pass locally, and lint passes. # Are there any user-facing changes? Yes. Setting `s3.signer` to an empty string in the REST catalog config now disables remote signing, even when the server config sets a signer. Nothing changes for users who do not set it. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
