You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "hdygxsj (via GitHub)" <gi...@apache.org> on 2025/08/21 12:51:51 UTC

[PR] [#8181] bug(authz): Fix can not list metalake after disable metalake [gravitino]

hdygxsj opened a new pull request, #8239:
URL: https://github.com/apache/gravitino/pull/8239

   ### What changes were proposed in this pull request?
   
   Fix can not list metalake after disable metalake
   
   ### Why are the changes needed?
   
   Fix: #8181 
   
   ### Does this PR introduce _any_ user-facing change?
   
   None
   
   ### How was this patch tested?
   
   org.apache.gravitino.client.integration.test.authorization.MetalakeAuthorizationIT
   


-- 
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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] [#8181] bug(authz): Fix can not list metalake after disable metalake [gravitino]

Posted by "xunliu (via GitHub)" <gi...@apache.org>.
xunliu commented on code in PR #8239:
URL: https://github.com/apache/gravitino/pull/8239#discussion_r2292412430


##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/MetalakeAuthorizationIT.java:
##########
@@ -72,23 +76,27 @@ public void testCreateMetalake() {
         "Only service admins can create metalakes, current user can't create the metalake,  you should configure it in the server configuration first",
         ForbiddenException.class,
         () -> {
-          normalUserClient.createMetalake("testMetalake2", "", new HashMap<>());
+          normalUserClient.createMetalake(testMetalake2, "", new HashMap<>());
         });
-    serviceAdminClient.createMetalake("testMetalake2", "", new HashMap<>());
-    serviceAdminClient.createMetalake("testMetalake3", "", new HashMap<>());
+    serviceAdminClient.createMetalake(testMetalake2, "", new HashMap<>());
+    serviceAdminClient.createMetalake(testMetalake3, "", new HashMap<>());
   }
 
   @Test
   @Order(2)
   public void testListMetalake() {
+
+    assertMetalakeEquals(
+        new String[] {METALAKE, testMetalake2, testMetalake3}, serviceAdminClient.listMetalakes());
+    serviceAdminClient.disableMetalake(testMetalake2);
     assertMetalakeEquals(

Review Comment:
   Maybe we need to add the next code in here?
   ```
       assertMetalakeEquals(new String[] {METALAKE}, normalUserClient.listMetalakes());
   ```



-- 
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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] [#8181] bug(authz): Fix can not list metalake after disable metalake [gravitino]

Posted by "hdygxsj (via GitHub)" <gi...@apache.org>.
hdygxsj closed pull request #8239: [#8181] bug(authz): Fix can not list metalake after disable metalake
URL: https://github.com/apache/gravitino/pull/8239


-- 
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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] [#8181] bug(authz): Fix can not list metalake after disable metalake [gravitino]

Posted by "unknowntpo (via GitHub)" <gi...@apache.org>.
unknowntpo commented on PR #8239:
URL: https://github.com/apache/gravitino/pull/8239#issuecomment-3212609126

   LGTM.


-- 
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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] [#8181] bug(authz): Fix can not list metalake after disable metalake [gravitino]

Posted by "hdygxsj (via GitHub)" <gi...@apache.org>.
hdygxsj commented on code in PR #8239:
URL: https://github.com/apache/gravitino/pull/8239#discussion_r2292440312


##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/MetalakeAuthorizationIT.java:
##########
@@ -72,23 +76,27 @@ public void testCreateMetalake() {
         "Only service admins can create metalakes, current user can't create the metalake,  you should configure it in the server configuration first",
         ForbiddenException.class,
         () -> {
-          normalUserClient.createMetalake("testMetalake2", "", new HashMap<>());
+          normalUserClient.createMetalake(testMetalake2, "", new HashMap<>());
         });
-    serviceAdminClient.createMetalake("testMetalake2", "", new HashMap<>());
-    serviceAdminClient.createMetalake("testMetalake3", "", new HashMap<>());
+    serviceAdminClient.createMetalake(testMetalake2, "", new HashMap<>());
+    serviceAdminClient.createMetalake(testMetalake3, "", new HashMap<>());
   }
 
   @Test
   @Order(2)
   public void testListMetalake() {
+
+    assertMetalakeEquals(
+        new String[] {METALAKE, testMetalake2, testMetalake3}, serviceAdminClient.listMetalakes());
+    serviceAdminClient.disableMetalake(testMetalake2);
     assertMetalakeEquals(

Review Comment:
   fixed



-- 
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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] [#8181] fix(authz): Fix can not list metalake after disable metalake [gravitino]

Posted by "xunliu (via GitHub)" <gi...@apache.org>.
xunliu merged PR #8239:
URL: https://github.com/apache/gravitino/pull/8239


-- 
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: commits-unsubscribe@gravitino.apache.org

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