eric-maynard commented on code in PR #1068:
URL: https://github.com/apache/polaris/pull/1068#discussion_r1990594761


##########
polaris-core/src/main/java/org/apache/polaris/core/PolarisConfigurationStore.java:
##########
@@ -117,4 +122,16 @@ public interface PolarisConfigurationStore {
       return getConfiguration(ctx, config);
     }
   }
+
+  public static <T> @Nonnull T getConfiguration(PolarisConfiguration<T> 
configuration) {
+    CallContext callContext = CallContext.getCurrentContext();
+    if (callContext == null) {
+      return configuration.defaultValue;

Review Comment:
   I do want to remove the ThreadLocal ASAP, but I wouldn't want to make 
refactoring away a ThreadLocal a blocker for a real feature that a user needs.
   
   I am open to at least fix tests so that the check for a null callcontext can 
be removed if it wasn't needed. There are additional tests that have a null 
`PolarisCallContext` while having a non-null `CallContext` -- shall I fix those 
too? To me, it still seems that if there is no CallContext then implicitly 
there can be no overrides as we aren't in the process of a real call against a 
real service that has been configured by an admin like you said.



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

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

Reply via email to