Copilot commented on code in PR #19646:
URL: https://github.com/apache/kafka/pull/19646#discussion_r2142949549


##########
tools/src/main/java/org/apache/kafka/tools/streams/StreamsGroupCommandOptions.java:
##########
@@ -148,21 +208,37 @@ public void checkArgs() {
                 LOGGER.debug("Option " + timeoutMsOpt + " is applicable only 
when " + describeOpt + " is used.");
         }
 
-        if (options.has(deleteOffsetsOpt)) {
-            checkDeleteOffsetsArgs();
-        }
-
         if (options.has(deleteOpt)) {
             if (!options.has(groupOpt) && !options.has(allGroupsOpt))
                 CommandLineUtils.printUsageAndExit(parser,
                     "Option " + deleteOpt + " takes one of these options: " + 
allGroupSelectionScopeOpts.stream().map(Object::toString).collect(Collectors.joining(",
 ")));
+            if (options.has(inputTopicOpt) || options.has(allInputTopicsOpt))
+                CommandLineUtils.printUsageAndExit(parser, "Kafka Streams does 
not support topic-specific offset " +
+                    "deletion from a streams group.");
+        }
+        if (options.has(deleteOffsetsOpt)) {
+            checkDeleteOffsetsArgs();
+        }
+
+        if (options.has(resetOffsetsOpt)) {
+            checkOffsetResetArgs();
         }
 
+        if ((options.has(dryRunOpt) || options.has(executeOpt)) && 
!options.has(resetOffsetsOpt))
+            CommandLineUtils.printUsageAndExit(parser, "Only Option " + 
resetOffsetsOpt + "accepts " + executeOpt + " or " + dryRunOpt);

Review Comment:
   [nitpick] Add a missing space or quote around `accepts` for readability and 
consistency, e.g., `"Only option 'reset-offsets' accepts 'execute' or 
'dry-run'"`.
   ```suggestion
               CommandLineUtils.printUsageAndExit(parser, "Only Option " + 
resetOffsetsOpt + " accepts " + executeOpt + " or " + dryRunOpt);
   ```



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to