[jira] [Updated] (SOLR-11206) Migrate logic from bin/solr scripts to SolrCLI
[ https://issues.apache.org/jira/browse/SOLR-11206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-11206: --- Attachment: SOLR-11206.patch Patch didn't apply cleanly to the latest master. Updating it. Still needs a _lot_ of work. > Migrate logic from bin/solr scripts to SolrCLI > -- > > Key: SOLR-11206 > URL: https://issues.apache.org/jira/browse/SOLR-11206 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) > Components: scripts and tools >Reporter: Jason Gerlowski > Fix For: master (8.0) > > Attachments: ctrl-script-output-benchmark.cmd, > ctrl-script-output-benchmark.sh, linux-initial-output.txt, SOLR-11206.patch, > SOLR-11206.patch, windows-initial-output.txt > > > The {{bin/solr}} and {{bin/solr.cmd}} scripts have taken on a lot of logic > that would be easier to maintain if it was instead written in Java code, for > a handful of reasons > * Any logic in the control scripts is duplicated in two places by definition. > * Increasing test coverage of this logic would be much easier if it was > written in Java. > * Few developers are conversant in both bash and Windows-shell, making > editing difficult. > Some sections in these scripts make good candidates for migration to Java. > This issue should examine any of these that are brought up. However the > biggest and most obvious candidate for migration is the argument parsing, > validation, usage/help text, etc. for the commands that don't directly > start/stop Solr processes (i.e. the "create", "delete", "zk", "auth", > "assert" commands). -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-11206) Migrate logic from bin/solr scripts to SolrCLI
[ https://issues.apache.org/jira/browse/SOLR-11206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-11206: --- Attachment: ctrl-script-output-benchmark.cmd windows-initial-output.txt Attaching the "benchmark" I was putting together on Windows. > Migrate logic from bin/solr scripts to SolrCLI > -- > > Key: SOLR-11206 > URL: https://issues.apache.org/jira/browse/SOLR-11206 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) > Components: scripts and tools >Reporter: Jason Gerlowski > Fix For: master (8.0) > > Attachments: ctrl-script-output-benchmark.cmd, > ctrl-script-output-benchmark.sh, linux-initial-output.txt, SOLR-11206.patch, > windows-initial-output.txt > > > The {{bin/solr}} and {{bin/solr.cmd}} scripts have taken on a lot of logic > that would be easier to maintain if it was instead written in Java code, for > a handful of reasons > * Any logic in the control scripts is duplicated in two places by definition. > * Increasing test coverage of this logic would be much easier if it was > written in Java. > * Few developers are conversant in both bash and Windows-shell, making > editing difficult. > Some sections in these scripts make good candidates for migration to Java. > This issue should examine any of these that are brought up. However the > biggest and most obvious candidate for migration is the argument parsing, > validation, usage/help text, etc. for the commands that don't directly > start/stop Solr processes (i.e. the "create", "delete", "zk", "auth", > "assert" commands). -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-11206) Migrate logic from bin/solr scripts to SolrCLI
[ https://issues.apache.org/jira/browse/SOLR-11206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-11206: --- Attachment: SOLR-11206.patch My access to Windows is spotty, and so I haven't been able to get an output-benchmark from a Windows machine yet, though I should have access and time to do so tomorrow. In the meantime, I'm uploading a proof-of-concept patch for one of the commands supported by the control-scripts ("create"). Notes/caveats on the patch: - I chose "create" because it had enough arguments to demonstrate the value in the change. - As I mentioned above, I haven't had Windows access recently, so there might be issues with the {{bin/solr.cmd}} changes. Though the changes are accurate enough to show the approach. - As-is, the patch matches command output on success, but error messages about missing/invalid arguments don't line up exactly with the pre-patch code. The argument parsing in Java-land uses the commons-cli library, which makes the parsing concise/convenient, but ties us to the error-message format dictated by the library. I'm curious what the backward-compatibility expectations are around the output of the bin/solr scripts. I've heard guidelines for the Java code, and for API output, but not for the control scripts. We can match all stdout output if we eschew commons-cli, but the library is so standard and makes the code so maintainable that I'd like to lobby for using it if it doesn't stretch/break our backward-compatibility promises/expectations. > Migrate logic from bin/solr scripts to SolrCLI > -- > > Key: SOLR-11206 > URL: https://issues.apache.org/jira/browse/SOLR-11206 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) > Components: scripts and tools >Reporter: Jason Gerlowski > Fix For: master (8.0) > > Attachments: ctrl-script-output-benchmark.sh, > linux-initial-output.txt, SOLR-11206.patch > > > The {{bin/solr}} and {{bin/solr.cmd}} scripts have taken on a lot of logic > that would be easier to maintain if it was instead written in Java code, for > a handful of reasons > * Any logic in the control scripts is duplicated in two places by definition. > * Increasing test coverage of this logic would be much easier if it was > written in Java. > * Few developers are conversant in both bash and Windows-shell, making > editing difficult. > Some sections in these scripts make good candidates for migration to Java. > This issue should examine any of these that are brought up. However the > biggest and most obvious candidate for migration is the argument parsing, > validation, usage/help text, etc. for the commands that don't directly > start/stop Solr processes (i.e. the "create", "delete", "zk", "auth", > "assert" commands). -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-11206) Migrate logic from bin/solr scripts to SolrCLI
[ https://issues.apache.org/jira/browse/SOLR-11206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-11206: --- Attachment: linux-initial-output.txt ctrl-script-output-benchmark.sh In a previous comment I mentioned that it'd be nice to have some sort of tests or benchmarks for how bin/solr currently behaviors under "normal" usage, before we migrate any bits of the logic to Java. I've taken the first crack at this here. The {{ctrl-script-output-benchmark.sh}} script runs most of the bin/solr commands, with a handful of correct and incorrect argument sets. It's by no means comprehensive, but at least it's _something_ to start with. It takes no arguments, and is meant to be run from the {{lucene-solr/solr}} directory. Also attached is the output of running the script on Linux. My plan is to upload similar artifacts from running on Windows, and then start on the first pass of the actual change. > Migrate logic from bin/solr scripts to SolrCLI > -- > > Key: SOLR-11206 > URL: https://issues.apache.org/jira/browse/SOLR-11206 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) > Components: scripts and tools >Reporter: Jason Gerlowski > Fix For: master (8.0) > > Attachments: ctrl-script-output-benchmark.sh, linux-initial-output.txt > > > The {{bin/solr}} and {{bin/solr.cmd}} scripts have taken on a lot of logic > that would be easier to maintain if it was instead written in Java code, for > a handful of reasons > * Any logic in the control scripts is duplicated in two places by definition. > * Increasing test coverage of this logic would be much easier if it was > written in Java. > * Few developers are conversant in both bash and Windows-shell, making > editing difficult. > Some sections in these scripts make good candidates for migration to Java. > This issue should examine any of these that are brought up. However the > biggest and most obvious candidate for migration is the argument parsing, > validation, usage/help text, etc. for the commands that don't directly > start/stop Solr processes (i.e. the "create", "delete", "zk", "auth", > "assert" commands). -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org