dimas-b commented on code in PR #4422:
URL: https://github.com/apache/polaris/pull/4422#discussion_r3277305916


##########
runtime/service/src/main/java/org/apache/polaris/service/admin/PolarisAdminService.java:
##########
@@ -882,6 +882,34 @@ private void validateUpdateCatalogDiffOrThrow(
     }
   }
 
+  // Package-private static for direct unit testing in 
BaseLocationValidationTest.
+  static void validateBaseLocationAgainstStorageConfig(
+      CatalogEntity catalogEntity, String newDefaultBaseLocation, String 
catalogName) {
+    PolarisStorageConfigurationInfo storageConfig = 
catalogEntity.getStorageConfigurationInfo();
+    if (storageConfig == null) {
+      return;
+    }
+
+    List<String> allowedLocations = storageConfig.getAllowedLocations();
+    if (allowedLocations == null || allowedLocations.isEmpty()) {
+      return;

Review Comment:
   This does not look correct to me. `InMemoryStorageIntegration` (link below) 
will NOT consider a location allowed when the configured "allowed list" is 
empty... unless I'm mistaken 🤔 
   
   
https://github.com/apache/polaris/blob/bf25373d025f917973778610c7b9bd01cdecc680/polaris-core/src/main/java/org/apache/polaris/core/storage/InMemoryStorageIntegration.java#L99-L100



-- 
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]

Reply via email to