Ankitraj-builds commented on code in PR #4134:
URL: https://github.com/apache/iceberg-python/pull/4134#discussion_r4617949548
##########
tests/catalog/test_rest.py:
##########
@@ -3481,6 +3481,46 @@ def
test_load_table_catalog_config_outranks_table_properties(
assert table.io.properties["s3.proxy-uri"] == "http://table-only-proxy"
+def test_load_table_empty_catalog_signer_disables_remote_signing(
+ rest_mock: Mocker, example_table_metadata_with_snapshot_v1: dict[str, Any]
+) -> None:
+ metadata_location =
"s3://warehouse/database/table/metadata/00001.metadata.json"
+ rest_mock.get(
+ f"{TEST_URI}v1/namespaces/fokko/tables/table",
+ json={
+ "metadata-location": metadata_location,
+ "metadata": example_table_metadata_with_snapshot_v1,
+ "config": {"s3.signer": "S3V4RestSigner", "s3.signer.uri":
"http://signer"},
+ },
+ status_code=200,
+ request_headers=TEST_HEADERS,
+ )
+ catalog = RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN,
**{"s3.signer": ""})
+ table = catalog.load_table(("fokko", "table"))
Review Comment:
Thanks @Fokko. This was on the first version, which used an empty s3.signer.
That is replaced now: users set s3.remote-signing-enabled=false instead
(rambleraptor suggested this), so an empty value has no special meaning anymore.
The use case from #3888: some users already have their own S3 credentials,
but the REST catalog sends s3.signer to every client. They then can’t turn
signing off, and every S3 request makes an extra trip to the signer. Java uses
the same s3.remote-signing-enabled property, and it’s also listed in #4140.
Happy to change the approach if you’d prefer something else.
--
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]