-
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-17382: remove -a and use full name for addlopts --additional-options #2684
Conversation
…o we dont need deprecation
Okay, I think this is ready! |
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'm ok with deprecating -a
. But --additiona-options
is quite verbose. Would it work with --jvm-opts
being both shorter and clearer?
I like |
I took your suggestion @janhoy. The |
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 left a few comments for potential breaking changes in case of backporting. Besides that, I'm fine too with jvm-opts
as a replacement. :)
@@ -426,7 +426,7 @@ IF "%1"=="-s" goto set_solr_url | |||
IF "%1"=="--solr-url" goto set_solr_url | |||
IF "%1"=="-solrUrl" goto set_solr_url | |||
IF "%1"=="-a" goto set_addl_opts | |||
IF "%1"=="--additional-options" goto set_addl_opts |
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.
Would we have to keep this for backwards compatibility in branch_9x
?
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.
Since we decided to go with --jvm-opts
instead of ```-addopts` this was never released so we are okay.
Option.builder("a") | ||
.argName("OPTS") |
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.
By removing this option should the DefaultParser
not throw an UnrecognizedOptionException
if the option is not present during parsing but the user passes -a
to the CLI?
This would break backwards compatibility as well if we plan to backport the changes to 9X
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 see your question now.. So the thing that is unqiue about RunExampleTool compared to our other Java *Tool
is that the arguments passed to it are NOT the ones typed by the human user! Instead, the start
command parses all the args and creates a NEW set of commands to RunExampleTool. So we can change how RunExampleTool works as LONG as we maps the args in the start
command.
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.
That makes sense. I was just unsure how changes in public classes should be treated in general, so I assumed it would also require deprecation for cases where someone accesses and uses the class(es) directly.
Thanks for clarifying. :)
solr assert --started https://localhost:${SOLR_PORT} --timeout 5000 | ||
|
||
# server2 will run on $SOLR2_PORT and will use server2.keystore. Initially, this is the same as server1.keystore | ||
export SOLR_SSL_KEY_STORE=$ssl_dir/server2.keystore.p12 | ||
export SOLR_SSL_TRUST_STORE=$ssl_dir/server2.keystore.p12 | ||
|
||
# leaving -a instead of --jvm-opts for back compat testing. | ||
solr start -c -z localhost:${ZK_PORT} -p ${SOLR2_PORT} -a "-Dsolr.jetty.sslContext.reload.scanInterval=1 -DsocketTimeout=5000" |
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.
This should fail based on my observations on a sample project. Can someone confirm that this works correctly?
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 am going to double check now by hand on main and branch_9x. I believe it will work because we left that -a
in the parsing logic for the start
command...
Thanks for going through and commenting @malliaridis, I just did some manual testing with 9x and it all looks okay! I ran:
And saw the new params in the solr admin ui list of args! |
Thanks for the replies and for double-checking everything for me. :) |
https://issues.apache.org/jira/browse/SOLR-17382
Description
Fix up the start command docs, and deprecate "addlopts" in RunExampleTool
Solution
Please provide a short description of the approach taken to implement your solution.
Tests
none :-(
Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.