smaheshwar-pltr opened a new issue, #1684:
URL: https://github.com/apache/iceberg-python/issues/1684

   When a `RESTCatalog` is constructed, `_fetch_config` immediately "merges" 
catalog properties with the REST server's response to `get_config`, updating 
`self.properties` accordingly.
   
   
https://github.com/apache/iceberg-python/blob/efc8b5ac0f16717f776e034ecf9a9e9bdabd8424/pyiceberg/catalog/rest.py#L265
   
   `RESTCatalog#auth_url`, invoked after construction of the `RESTCatalog`, 
then uses those "merged" properties to get the `auth_url`:
   
   
https://github.com/apache/iceberg-python/blob/efc8b5ac0f16717f776e034ecf9a9e9bdabd8424/pyiceberg/catalog/rest.py#L330-L331
   
   If I've understood correctly, this means PyIceberg users can instead get the 
auth URI from the server-returned configs instead of having to configure it 
themselves.
   
   On the other hand, Iceberg's Java side 
[sets](https://github.com/apache/iceberg/blob/fad0c1e6c68fbc7e48b5b17c02ed9c26a2693afb/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L245-L246)
 `oauth2ServerUri` *before* the config is fetched 
[here](https://github.com/apache/iceberg/blob/fad0c1e6c68fbc7e48b5b17c02ed9c26a2693afb/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L257-L260)
 so it doesn't allow the above. To note that it [uses the `fetchToken` response 
to fetch the 
config](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L252-L257C42).
   
   Actually not sure which behaviour is better/correct here - just flagging 
that they're different and feels weird that REST servers can provide this URI 
for PyIceberg but not on the Java-side.


-- 
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-unsubscr...@iceberg.apache.org.apache.org

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


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

Reply via email to