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


##########
spec/polaris-management-service.yml:
##########
@@ -882,7 +882,6 @@ components:
       required:
         - name
         - type
-        - storageConfigInfo

Review Comment:
   Since this is a REST API change, in Polaris this normally needs a related 
`dev` email discussion. Please open a thread there.
   
   https://polaris.apache.org/community/



##########
runtime/service/src/main/java/org/apache/polaris/service/admin/PolarisServiceImpl.java:
##########
@@ -127,7 +127,13 @@ private static Response toResponse(BaseResult result, 
Response.Status successSta
   public Response createCatalog(
       CreateCatalogRequest request, RealmContext realmContext, SecurityContext 
securityContext) {
     Catalog catalog = request.getCatalog();
-    validateStorageConfig(catalog.getStorageConfigInfo());
+    if (catalog.getType() == Catalog.TypeEnum.INTERNAL && 
catalog.getStorageConfigInfo() == null) {
+      throw new IllegalArgumentException(
+          "Invalid value: createCatalog.arg0.catalog.storageConfigInfo: must 
not be null");

Review Comment:
   what is `arg0`?



##########
.gitignore:
##########
@@ -121,3 +121,4 @@ application-local.properties
 .cursor/
 .opencode/
 skills-lock.json
+CLAUDE.md

Review Comment:
   Please move this to a dedicated PR



##########
api/management-model/src/test/java/org/apache/polaris/core/admin/model/CatalogSerializationTest.java:
##########
@@ -55,13 +55,15 @@ public void testCatalogSerialization(String description, 
Catalog catalog)
   @Test
   public void testJsonFormat() throws JsonProcessingException {
     Catalog catalog =
-        new Catalog(
-            Catalog.TypeEnum.INTERNAL,
-            TEST_CATALOG_NAME,
-            new CatalogProperties(TEST_LOCATION),
-            AwsStorageConfigInfo.builder(StorageConfigInfo.StorageTypeEnum.S3)
-                .setRoleArn(TEST_ROLE_ARN)
-                .build());
+        PolarisCatalog.builder()

Review Comment:
   Is this change relevant to the purpose of this PR?



##########
runtime/service/src/main/java/org/apache/polaris/service/admin/PolarisAdminService.java:
##########
@@ -599,6 +602,12 @@ private boolean 
catalogOverlapsWithExistingCatalog(CatalogEntity catalogEntity)
       return false;
     }
 
+    if (catalogEntity.isExternal()
+        && catalogEntity.getStorageConfigurationInfo() == null
+        && catalogEntity.getBaseLocation() == null) {
+      return false;

Review Comment:
   This is not a true negative answer to 
`catalogOverlapsWithExistingCatalog()`. The true answer in this case is "we do 
not know".
   
   This change needs to be discussed on `dev`, I think.



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