dimas-b commented on code in PR #1068:
URL: https://github.com/apache/polaris/pull/1068#discussion_r1990201477
##########
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:
> When is it not valid to use the default value if CallContext it not
available?
If we have a call path that get the config from `CallContext`, to me it
reads that we want to get config (overrides) from `CallContex`, which is
ultimately set by the admin user.
If `CallContext` is not available, the default is used even if the admin
user changed the config.
Now, the admin user loses control over the config setting because the admin
cannot reason about when the override is used and when the default.
--
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]