nick-boss-tech commented on PR #5337:
URL: https://github.com/apache/solr/pull/5337#issuecomment-6868871342

   🤖 *AI text below* 🤖 *(reviewed by Nick Shanin)*
   
   I found three exit-code gaps in the current PR. On Unix, `solr --help` 
returns 0 even if the JVM fails to start. With Commons CLI, bare `package` and 
`snapshot` do not return 2 with usage. On Windows, `solr.cmd` converts exit 
code 2 to 1.
   
   Picocli is the default and is replacing Commons CLI. The Commons CLI cases 
affect the fallback selected by `SOLR_PICOCLI=false`. Both launcher fixes also 
apply to picocli.
   
   I prepared [a 
follow-up](https://github.com/nick-boss-tech/solr/compare/944f3ec319caee19a8061feb227ee20b4cd8dcbe...21379130f426433f163fcd61f0731b8ad51d1412)
 that preserves the launcher exit status, handles the two Commons CLI cases, 
and adds tests for both launchers.
   
   <details>
   <summary>Linux and Windows verification at 
21379130f426433f163fcd61f0731b8ad51d1412</summary>
   
   - On Linux, `test_help.bats` passed all 18 cases with each parser. 
`SolrCLIPicocliTest` passed 8 tests with seed `5337C0DE`. Tidy and `check -x 
test` passed. [Linux 
results](https://github.com/nick-boss-tech/solr/blob/36d022e03857023b0ddbe6e0677ec2a64268f991/records/evidence/pr-5337-cli-exit-gate-r2-evidence.txt).
   - On Windows, the launcher test passed 26 invocations against an assembled 
distribution, including both parser modes and a JVM startup failure. [Windows 
results](https://github.com/nick-boss-tech/solr/blob/36d022e03857023b0ddbe6e0677ec2a64268f991/records/report/pr-5337-windows-proof-r2-result.json).
   - On the original PR head with only the new Bats tests applied, the Commons 
CLI run failed the `snapshot`, `package`, and JVM failure cases. The picocli 
run failed the JVM failure case.
   
   </details>
   
   The follow-up is a fast-forward of the current PR head:
   
   ```sh
   git switch SOLR-18649-18654-cli-exit-codes
   git fetch https://github.com/nick-boss-tech/solr.git pr-5337-cli-exit-fixes
   git merge --ff-only 21379130f426433f163fcd61f0731b8ad51d1412
   ```
   
   Would you like to include these changes in the PR?
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to