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

[PR] Fix metadata confusion in GravitinoInterceptionService [gravitino]

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

   <!--
   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?
   
   GravitinoInterceptionService.java there was an error - wrong NameIdentifier was used.
   
   ### Why are the changes needed?
   
   This PR fixes bug when wrong NameIdentifier was used in GravitinoInterceptionService.java
   
   Fix: #8013
   
   ### Does this PR introduce _any_ user-facing change?
   
   (Please list the user-facing changes introduced by your change, including
     1. Change in user-facing APIs.
     2. Addition or removal of property keys.)
   
   ### How was this patch tested?
   
   1. By running relevant JUnit 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] Fix metadata confusion in GravitinoInterceptionService [gravitino]

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


##########
server/src/main/java/org/apache/gravitino/server/web/filter/GravitinoInterceptionService.java:
##########
@@ -234,10 +234,8 @@ private Map<Entity.EntityType, NameIdentifier> extractNameIdentifierFromParamete
                     NameIdentifierUtil.ofFileset(metalake, catalog, schema, fileset));
                 break;
               case MODEL:
-                String model = entities.get(Entity.EntityType.MODEL);
                 nameIdentifierMap.put(
-                    Entity.EntityType.MODEL,
-                    NameIdentifierUtil.ofModel(metadata, catalog, schema, model));

Review Comment:
   Actually the issue is with this line I believe



-- 
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] Fix metadata confusion in GravitinoInterceptionService [gravitino]

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

   @justinmclean Please have a look & review.


-- 
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] Fix metadata confusion in GravitinoInterceptionService [gravitino]

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


##########
server/src/main/java/org/apache/gravitino/server/web/filter/GravitinoInterceptionService.java:
##########
@@ -234,10 +234,8 @@ private Map<Entity.EntityType, NameIdentifier> extractNameIdentifierFromParamete
                     NameIdentifierUtil.ofFileset(metalake, catalog, schema, fileset));
                 break;
               case MODEL:
-                String model = entities.get(Entity.EntityType.MODEL);
                 nameIdentifierMap.put(
-                    Entity.EntityType.MODEL,
-                    NameIdentifierUtil.ofModel(metadata, catalog, schema, model));
+                    Entity.EntityType.MODEL, NameIdentifierUtil.ofMetalake(metalake));

Review Comment:
   no need to change the identifier, that'd lead to issues. You just need to replace `metadata` with `metalake` in the `ofModel` parameters in the original code.



-- 
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] Fix metadata confusion in GravitinoInterceptionService [gravitino]

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


##########
server/src/main/java/org/apache/gravitino/server/web/filter/GravitinoInterceptionService.java:
##########
@@ -234,10 +234,8 @@ private Map<Entity.EntityType, NameIdentifier> extractNameIdentifierFromParamete
                     NameIdentifierUtil.ofFileset(metalake, catalog, schema, fileset));
                 break;
               case MODEL:
-                String model = entities.get(Entity.EntityType.MODEL);
                 nameIdentifierMap.put(
-                    Entity.EntityType.MODEL,
-                    NameIdentifierUtil.ofModel(metadata, catalog, schema, model));

Review Comment:
   no need to change the identifier, that'd lead to issues. You just need to replace `metadata` with `metalake` in the `ofModel` parameters in the original code.



-- 
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] Fix metadata confusion in GravitinoInterceptionService [gravitino]

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

   @justinmclean, @georgereuben Please have a look. I hope it is OK now.


-- 
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] Fix metadata confusion in GravitinoInterceptionService [gravitino]

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


-- 
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] Fix metadata confusion in GravitinoInterceptionService [gravitino]

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


##########
server/src/main/java/org/apache/gravitino/server/web/filter/GravitinoInterceptionService.java:
##########
@@ -234,10 +234,8 @@ private Map<Entity.EntityType, NameIdentifier> extractNameIdentifierFromParamete
                     NameIdentifierUtil.ofFileset(metalake, catalog, schema, fileset));
                 break;
               case MODEL:
-                String model = entities.get(Entity.EntityType.MODEL);
                 nameIdentifierMap.put(
-                    Entity.EntityType.MODEL,
-                    NameIdentifierUtil.ofModel(metadata, catalog, schema, model));

Review Comment:
   The issue is with this line and we still need catalog, schema and model



-- 
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] Fix metadata confusion in GravitinoInterceptionService [gravitino]

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

   @justinmclean The build is green and PR can now be merged.


-- 
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] Fix metadata confusion in GravitinoInterceptionService [gravitino]

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


##########
server/src/main/java/org/apache/gravitino/server/web/filter/GravitinoInterceptionService.java:
##########
@@ -234,10 +234,8 @@ private Map<Entity.EntityType, NameIdentifier> extractNameIdentifierFromParamete
                     NameIdentifierUtil.ofFileset(metalake, catalog, schema, fileset));
                 break;
               case MODEL:
-                String model = entities.get(Entity.EntityType.MODEL);
                 nameIdentifierMap.put(
-                    Entity.EntityType.MODEL,
-                    NameIdentifierUtil.ofModel(metadata, catalog, schema, model));

Review Comment:
   no need to change the identifier, that'd lead to issues. You just need to replace `metadata` with `metalake` in the `ofModel` parameters in the original code.



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