-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-17595: Fix Solr examples for Windows #2909
Conversation
# Conflicts: # solr/bin/solr.cmd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this PR incomplete? Was expecting a fix in cmd script according to the PR description?
EDIT Forget that, I looked at the commit directly to main now. Have no time to test it but it local tests fix the issue for you, I’m ok 👌 with this.
Yeah, I messed up the PR by pushing the first fix first in main. So I have to make sure its included in the backport. I will merge by tomorrow if there is no objection by then. I have only tested the techproducts, so before I merge I will look into the other examples as well to make sure they all work properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I very much appreciate your attention to detail and making sure our window's users have a good onboarding experience!
* Fix argument parsing for -D options with multiple values on Windows * Fix invalid usage of wildcards in RunExampleTool / PostTool (cherry picked from commit a4229e7)
* Fix argument parsing for -D options with multiple values on Windows (cherry picked from commit 44ea44d) * SOLR-17595: Fix Solr examples for Windows (#2909) * Fix argument parsing for -D options with multiple values on Windows * Fix invalid usage of wildcards in RunExampleTool / PostTool (cherry picked from commit a4229e7) * Fix unsupported method
* Fix argument parsing for -D options with multiple values on Windows (cherry picked from commit 44ea44d) * SOLR-17595: Fix Solr examples for Windows (#2909) * Fix argument parsing for -D options with multiple values on Windows * Fix invalid usage of wildcards in RunExampleTool / PostTool (cherry picked from commit a4229e7) * Fix unsupported method
https://issues.apache.org/jira/browse/SOLR-17595
Description
Since 9.7 the Solr examples (specifically the techproducts) are not working properly and throw an error on startup.
There are two issues in
main
. First bug is found insolr.cmd
, in which the changes from #2875 run into. The argument parsing in Windows for-D
options with multiple values, like-Dsolr.modules=module1,module2,module3
, is failing, as each value of the same option is parsed as separate argument. The other bug is related to the wildcard used in the techproducts example. The usage of*.xml
is apparently not supported. This may be Windows-specific.Solution
The fix for the first issue is to iterate over the arguments in the script and include them all, similar to the parsing logic of other arguments.
The second fix for the wildcard is to switch to the
--filetypes
parameter to filter correctly the files by thexml
filetype.Note that If we want to support wildcards in the future, we may have to change the logic for parsing paths.
Please also note that a commit was accidentally pushed to main directly and therefore not included in the changes of this PR (see 44ea44d).
All fixes in this PR should be backported to 9x and 9.8, as they are likely present in previous versions, including 9.7.
Tests
Some changes are related to the Windows solr.cmd script for which we do not have any tests (see SOLR-17508), and the other changes simply remove unsupported glob patterns in PostTool arguments.
Checklist
main
branch../gradlew check
.