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

[PR] [#8281]Improvement(PolicyOperation): handle policy exception parameters [gravitino]

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

   <!--
   1. Title: [#<issue>] <type>(<scope>): <subject>
      Examples:
        - "[#123] feat(operator): support xxx"
        - "[#233] fix: check null before access result in xxx"
        - "[MINOR] refactor: fix typo in variable name"
        - "[MINOR] docs: fix typo in README"
        - "[#255] test: fix flaky test NameOfTheTest"
      Reference: https://www.conventionalcommits.org/en/v1.0.0/
   2. If the PR is unfinished, please mark this PR as draft.
   -->
   
   ### What changes were proposed in this pull request?
   Fixed handlePolicyException paramaters in PolicyOperations.java
   
   ### Why are the changes needed?
   improvement for handlePolicyException
   
   Fix: #8281 
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   Unit test
   


-- 
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] [#8281]Improvement(PolicyOperation): handle policy exception parameters [gravitino]

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


##########
server/src/main/java/org/apache/gravitino/server/web/rest/PolicyOperations.java:
##########
@@ -287,7 +287,7 @@ public Response listMetadataObjectsForPolicy(
           });
 
     } catch (Exception e) {
-      return ExceptionHandlers.handlePolicyException(OperationType.LIST, "", policyName, e);
+      return ExceptionHandlers.handlePolicyException(OperationType.LIST, policyName, metalake, e);

Review Comment:
   Yes.



-- 
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] [#8281]Improvement(PolicyOperation): handle policy exception parameters [gravitino]

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


##########
server/src/main/java/org/apache/gravitino/server/web/rest/PolicyOperations.java:
##########
@@ -287,7 +287,7 @@ public Response listMetadataObjectsForPolicy(
           });
 
     } catch (Exception e) {
-      return ExceptionHandlers.handlePolicyException(OperationType.LIST, "", policyName, e);
+      return ExceptionHandlers.handlePolicyException(OperationType.LIST, policyName, metalake, e);

Review Comment:
   The change is not correct, it should be `ExceptionHandlers.handlePolicyException(OperationType.LIST, "", metalake, e);`



-- 
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] [#8281]Improvement(PolicyOperation): handle policy exception parameters [gravitino]

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


##########
server/src/main/java/org/apache/gravitino/server/web/rest/PolicyOperations.java:
##########
@@ -287,7 +287,7 @@ public Response listMetadataObjectsForPolicy(
           });
 
     } catch (Exception e) {
-      return ExceptionHandlers.handlePolicyException(OperationType.LIST, "", policyName, e);
+      return ExceptionHandlers.handlePolicyException(OperationType.LIST, policyName, metalake, e);

Review Comment:
   @jerryshao issue mentioned that the order of parameters are incorrect and to use metalake as the parent. as per your suggestion, policyName should be empty, do you want me to update the PR with that change. 



-- 
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] [#8281]Improvement(PolicyOperation): handle policy exception parameters [gravitino]

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


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