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

[PR] [Improvement] In OwnerDetails.java exit if entity type is null [gravitino]

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

   ### Summary
   Fixes issue #8291 by adding a null-check for entityType in OwnerDetails.java.
   
   ### Details
   - Added validation so the command exits early if entityType is null.
   - Verified with existing test: testHandle_withoutValidate_shouldExitWithUnknownEntity.
   - No new tests added, since coverage already exists.
   
   ### Notes
   - Ran tests locally, all passed.
   


-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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

   OK for me. But I'm not familiar with this module.


-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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

   Thanks for it, but it looks like a few extra empty files got added. I think Spotless might fail as well as there a spacing change with a comment.


-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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


##########
clients/cli/src/main/java/org/apache/gravitino/cli/commands/OwnerDetails.java:
##########
@@ -1,20 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */

Review Comment:
   There should be no need to change the license header.



-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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


-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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


##########
clients/cli/src/main/java/org/apache/gravitino/cli/commands/OwnerDetails.java:
##########
@@ -36,14 +34,6 @@ public class OwnerDetails extends Command {
   protected final String entity;
   protected final MetadataObject.Type entityType;
 
-  /**
-   * Displays the owner of an entity.
-   *
-   * @param context The command context.
-   * @param metalake The name of the metalake.
-   * @param entity The name of the entity.
-   * @param entityType The type entity.
-   */

Review Comment:
   Please add this back in



-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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


##########
clients/cli/src/main/java/org/apache/gravitino/cli/commands/OwnerDetails.java:
##########
@@ -64,9 +54,12 @@ public OwnerDetails(CommandContext context, String metalake, String entity, Stri
     }
   }
 
-  /** Displays the owner of an entity. */

Review Comment:
   please add this back in



-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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

   The CI is failing as we use Spottkless to ensure code is consistently formatted. You can fix this by running `./gradlew :clients:cli:spotlessApply` or removing the extra blank line.


-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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

   @justinmclean  fixed all the comments


-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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

   The actual fix is fine, and no changes are needed there.


-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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

   Thanks


-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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

   Hi @justinmclean ,
   I’ve fixed the Spotless formatting issue and pushed the changes. The PR should be good 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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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

   Hello @justinmclean,
   I’ve completed the final changes -- fixed the spacing issues and removed the unnecessary files.


-- 
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] [#8291] In OwnerDetails.java exit if entity type is null [gravitino]

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

   Thanks @justinmclean for your patience and guidance :)


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