You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2025/01/09 22:08:57 UTC

[PR] HDDS-12058. Use CommandLine out/err in GenericCli subclasses [ozone]

adoroszlai opened a new pull request, #7673:
URL: https://github.com/apache/ozone/pull/7673

   ## What changes were proposed in this pull request?
   
   picocli allows setting custom out/err streams to [make testing easier](https://picocli.info/#_black_box_and_white_box_testing).  This PR updates subclasses of `GenericCli` (except `OzoneRepair`, which is being changed in #7653) to use these custom streams instead of `System.out/err`.  (Further PRs will take care of sets of subcommands to avoid too large patches.)
   
   https://issues.apache.org/jira/browse/HDDS-12058
   
   ## How was this patch tested?
   
   Tested some of the commands manually:
   
   ```
   $ bin/ozone getconf -Dasdf=qwerty confKey asdf
   qwerty
   
   $ bin/ozone checknative                       
   Native library checking:
   hadoop:  false 
   ISA-L:   false 
   rocks-tools: false 
   
   $ bin/ozone genconf /tmp
   ozone-site.xml has been generated at /tmp
   ```
   
   CI:
   https://github.com/adoroszlai/ozone/actions/runs/12697388661
   


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-12058. Use CommandLine out/err in GenericCli subclasses [ozone]

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


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-12058. Use CommandLine out/err in GenericCli subclasses [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #7673:
URL: https://github.com/apache/ozone/pull/7673#issuecomment-2585111972

   > Will it make sense to add helper methods in `GenericCli` to print the output and error messages?
   
   Thanks @nandakumar131 for the suggestion.  Added `out()` and `err()` in `GenericCli` for easier access to the writers.


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-12058. Use CommandLine out/err in GenericCli subclasses [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #7673:
URL: https://github.com/apache/ozone/pull/7673#issuecomment-2585385874

   Thanks @nandakumar131 for the 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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org