You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2023/01/17 19:04:02 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #6609: Core: Add test for token expiration during refresh

nastra commented on code in PR #6609:
URL: https://github.com/apache/iceberg/pull/6609#discussion_r1072678579


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -165,8 +165,13 @@ public void initialize(String name, Map<String, String> unresolved) {
             CatalogProperties.AUTH_DEFAULT_REFRESH_ENABLED_DEFAULT);
     this.client = clientBuilder.apply(mergedProps);
     this.paths = ResourcePaths.forCatalogProperties(mergedProps);
+    int tokenRefreshRetries =
+        PropertyUtil.propertyAsInt(
+            props,
+            OAuth2Properties.TOKEN_REFRESH_NUM_RETRIES,
+            OAuth2Properties.TOKEN_REFRESH_NUM_RETRIES_DEFAULT);
 
-    this.catalogAuth = new AuthSession(baseHeaders, null, null, credential);
+    this.catalogAuth = new AuthSession(baseHeaders, null, null, credential, tokenRefreshRetries);

Review Comment:
   We discussed this offline and concluded that we don't want to expose `OAuth2Properties.TOKEN_REFRESH_NUM_RETRIES` and make it externally configurable. 
   We agreed to add a `public static` field to `AuthSession` 
   



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org