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

[I] [Improvement] Improve the fileset update command in the CLI [gravitino]

justinmclean opened a new issue, #8283:
URL: https://github.com/apache/gravitino/issues/8283

   ### What would you like to be improved?
   
   Make the fileset update command in the CLI exit with an error when neither --comment nor --rename is specified.
   
   clients/cli/src/main/java/org/apache/gravitino/cli/FilesetCommandHandler.java will need to be updated.
   
   Here's a test for that:
   ```
     @Test
     void testUpdateFilesetCommandWithoutOptions() {
       Main.useExit = false;
   
       when(mockCommandLine.hasOption(GravitinoOptions.METALAKE)).thenReturn(true);
       when(mockCommandLine.getOptionValue(GravitinoOptions.METALAKE))
           .thenReturn("metalake_demo");
       when(mockCommandLine.hasOption(GravitinoOptions.NAME)).thenReturn(true);
       when(mockCommandLine.getOptionValue(GravitinoOptions.NAME))
           .thenReturn("catalog.schema.fileset");
   
       GravitinoCommandLine commandLine =
           new GravitinoCommandLine(
               mockCommandLine, mockOptions, CommandEntities.FILESET, CommandActions.UPDATE);
   
       assertThrows(RuntimeException.class, commandLine::handleCommandLine);
       String errOutput = new String(errContent.toByteArray(), StandardCharsets.UTF_8).trim();
       assertEquals(ErrorMessages.MISSING_COMMENT_OR_RENAME, errOutput);
     }
   ```
   
   ### How should we improve?
   
   as above


-- 
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.apache.org

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


Re: [I] [Improvement] Improve the fileset update command in the CLI [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on issue #8283:
URL: https://github.com/apache/gravitino/issues/8283#issuecomment-3222774298

   Yes all yours


-- 
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: [I] [Improvement] Improve the fileset update command in the CLI [gravitino]

Posted by "Aamir017 (via GitHub)" <gi...@apache.org>.
Aamir017 commented on issue #8283:
URL: https://github.com/apache/gravitino/issues/8283#issuecomment-3222918758

   Hi, I’m interested in fixing this. Could you assign it to me?
   @justinmclean
   
   


-- 
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: [I] [Improvement] Improve the fileset update command in the CLI [gravitino]

Posted by "keepConcentration (via GitHub)" <gi...@apache.org>.
keepConcentration commented on issue #8283:
URL: https://github.com/apache/gravitino/issues/8283#issuecomment-3223858241

   @justinmclean 
   
   I noticed the error constant is named `MISSING_COMMENT_OR_RENAME`.
   Since the actual case is when both `--comment` and `--rename` are missing, would it be clearer to call this something like `MISSING_COMMENT_AND_RENAME` instead? Or is the current naming intentional?


-- 
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: [I] [Improvement] Improve the fileset update command in the CLI [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on issue #8283:
URL: https://github.com/apache/gravitino/issues/8283#issuecomment-3224107449

   Pick the name you think is best


-- 
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: [I] [Improvement] Improve the fileset update command in the CLI [gravitino]

Posted by "keepConcentration (via GitHub)" <gi...@apache.org>.
keepConcentration commented on issue #8283:
URL: https://github.com/apache/gravitino/issues/8283#issuecomment-3222722735

   @justinmclean 
   
   Hi, I’m interested in fixing this. Could you assign it to me?


-- 
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: [I] [Improvement] Improve the fileset update command in the CLI [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on issue #8283:
URL: https://github.com/apache/gravitino/issues/8283#issuecomment-3223049839

   Hi @Aamir017, thanks for offering to help, but @keepConcentration is working on it.


-- 
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: [I] [Improvement] Improve the fileset update command in the CLI [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean closed issue #8283: [Improvement] Improve the fileset update command in the CLI
URL: https://github.com/apache/gravitino/issues/8283


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