zhangxinyao88 commented on code in PR #17912:
URL: https://github.com/apache/iceberg/pull/17912#discussion_r3973314385


##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java:
##########
@@ -461,7 +464,14 @@ private void refreshStorageCredentials() {
       return;
     }
 
-    try (VendedCredentialsProvider provider = 
VendedCredentialsProvider.create(properties)) {
+    Map<String, String> refreshProperties = Maps.newHashMap(properties);

Review Comment:
   You're right, thanks. `AwsClientProperties` handles the initial client 
setup, but the scheduled refresh creates `VendedCredentialsProvider` from the 
raw FileIO properties. I moved the resolution into the provider so both paths 
use it, and added a relative URI test in 948006979.



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

Review Comment:
   Yes, GCS had the same gap. Its refresh path also uses raw properties, so I 
added the same resolution in `OAuth2RefreshCredentialsHandler`, with a 
regression test in 948006979.



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