nastra commented on code in PR #14178:
URL: https://github.com/apache/iceberg/pull/14178#discussion_r2399187196
##########
core/src/main/java/org/apache/iceberg/rest/auth/OAuth2Manager.java:
##########
@@ -168,22 +168,23 @@ public AuthSession tableSession(RESTClient sharedClient,
Map<String, String> pro
// Important: this method is invoked from standalone components; we must
not assume that
// the refresh client and session cache have been initialized, because
catalogSession()
// won't be called.
- if (refreshClient == null) {
- refreshClient = sharedClient.withAuthSession(parent);
- }
- if (sessionCache == null) {
- sessionCache = newSessionCache(name, properties);
- }
+ String oauth2ServerUri =
+ properties.getOrDefault(OAuth2Properties.OAUTH2_SERVER_URI,
ResourcePaths.tokens());
if (config.token() != null) {
+ refreshClient(sharedClient, parent);
Review Comment:
sorry I'm just realizing now that the refresh client and the cache is used
differently than I was expecting, which actually makes just calling
`refreshClient(..)` here weird (since I was assuming we would update all places
to just call `refreshClient(..)` and that method would return the initialized
client.
Let me think a bit about this
--
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]