nick-boss-tech opened a new pull request, #5289:
URL: https://github.com/apache/solr/pull/5289

   🤖 *AI text below* 🤖 *(reviewed by Nick Shanin)*
   
   **The slim distribution no longer includes the examples, and `bin/solr start 
-e` on a slim install now says so instead of reporting an invalid example 
directory.**
   
   [SOLR-18169](https://issues.apache.org/jira/browse/SOLR-18169) asks for two 
things: the slim distribution should not ship the examples, and trying to run 
an example from a slim install should give a helpful error.
   
   ## What changes
   
   - 
[solr/packaging/build.gradle](https://github.com/apache/solr/blob/f5a5480383a2e8d25d1411ec1d813da593305952/solr/packaging/build.gradle):
 the example content moves out of the slim distribution contents and into the 
full distribution contents, which are assembled on top of the slim contents. 
Nothing else about either distribution changes, and the Docker slim image, 
which is built from the slim distribution, picks this up without a Dockerfile 
change.
   - 
[RunExampleTool.java](https://github.com/apache/solr/blob/f5a5480383a2e8d25d1411ec1d813da593305952/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java):
 when the default example directory (next to the server directory) is missing 
and the user did not pass an explicit `--example-dir`, the tool now fails with 
"Examples are not included in the slim distribution. Use the full Solr 
distribution to run examples." An explicit `--example-dir` pointing at a 
missing directory keeps the existing invalid-value error, and behavior with the 
examples present is unchanged.
   - 
[TestSolrCLIRunExample.java](https://github.com/apache/solr/blob/f5a5480383a2e8d25d1411ec1d813da593305952/solr/core/src/test/org/apache/solr/cli/TestSolrCLIRunExample.java):
 three new tests pin the new slim message, the preserved explicit-directory 
error, and the preserved unsupported-example error when the example directory 
exists.
   - [Changelog 
fragment](https://github.com/apache/solr/blob/f5a5480383a2e8d25d1411ec1d813da593305952/changelog/unreleased/solr-18169-slim-no-examples.yml).
   
   ## Verification
   
   At head `f5a5480383`:
   
   - `:solr:packaging:installSlimDist` and `:solr:packaging:installFullDist` 
both ran successfully. The installed slim tree has no `example/` directory; the 
installed full tree has `example/` containing README.md, exampledocs, and films.
   - TestSolrCLIRunExample passes 9 of 9 tests.
   - The new slim-message test fails without the fix: run against main at 
`ad26fdf2c6` with only the new test file added, it fails because the code 
answers with the old invalid-directory message; the other 8 tests in the suite 
pass there, and all 9 pass with the fix.
   - `:solr:core:check -x test` passed, with Error Prone enabled for the 
compile (`-Pvalidation.errorprone=true`). Tidy leaves the tree unchanged.
   
   ## Limits
   
   Verification is at the unit and distribution-assembly level. A live 
`bin/solr start -e techproducts` run against an installed slim tree was not 
performed; the error path it exercises is the one the new unit test covers.
   
   *Nick Shanin directed the work and takes responsibility for this 
contribution.*
   


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