shoemoney commented on code in PR #17817:
URL: https://github.com/apache/iceberg/pull/17817#discussion_r4121874116


##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java:
##########
@@ -461,7 +463,13 @@ private void refreshStorageCredentials() {
       return;
     }
 
-    try (VendedCredentialsProvider provider = 
VendedCredentialsProvider.create(properties)) {
+    Map<String, String> refreshProperties = Maps.newHashMap(properties);
+    String endpoint =
+        RESTUtil.resolveEndpoint(
+            properties.get(CatalogProperties.URI), 
properties.get(VendedCredentialsProvider.URI));
+    refreshProperties.put(VendedCredentialsProvider.URI, endpoint);

Review Comment:
   Test added in 649dbdf (`credentialRefreshResolvesRelativeCredentialsUri`) — 
covers a relative `credentials.uri` going through the refresh path.
   
   On which catalog: it's not catalog-specific. 
`client.refresh-credentials-endpoint` / `credentials.uri` isn't required to be 
absolute anywhere in the REST spec — it's just a table config value the catalog 
server sets. `AwsClientProperties` already resolves it against `catalog.uri` 
when the provider is first built, but `S3FileIO`'s own refresh path was reading 
the raw property straight off the table config, so any server that hands back a 
relative value there hits this on refresh.



-- 
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]

Reply via email to