Skip to content
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-17488: CLI: Resolve -d conflicts #2754

Merged
merged 6 commits into from
Oct 11, 2024
Merged

SOLR-17488: CLI: Resolve -d conflicts #2754

merged 6 commits into from
Oct 11, 2024

Conversation

epugh
Copy link
Contributor

@epugh epugh commented Oct 10, 2024

https://issues.apache.org/jira/browse/SOLR-17488

Description

see jira

Solution

  • Deprecate -d for server-dir in RunExmapleTool.
  • Support --server-dir in bin/solr and bin/solr.cmd
  • Deprecate -d for delay in PostTool to avoid any confusion with conf-dir.

Tests

bats and java tests

remove the overloading of -d by using the long version.  No need to deprecate since it's all internal to the scripts.
@epugh
Copy link
Contributor Author

epugh commented Oct 10, 2024

@malliaridis this is ready, I avoided deciding what to do about keep versus --delete-config since deciding that wasn't requried to resolve -d conflicts.

Copy link
Contributor

@malliaridis malliaridis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for creating a PR this quick. I have found a couple -d references, mainly in documentation, that need to be updated as well:

  • bin/solr.cmd#408: IF "%1"=="--server-dir" goto set_server_dir should be included
  • bin/solr.cmd#1522-1524 (around): In the code block only -d is checked, but --server-dir should be included as well probably
  • bin/solr#1375: -d in error message should be --server-dir
  • solr-control-script-reference.adoc#99: -d should be --server-dir
  • solr-control-script-reference.adoc#110: -d should be --server-dir
  • solr-control-script-reference.adoc#206: -d should be --server-dir
  • solr-control-script-reference.adoc#281: -d should be --server-dir
  • solr-control-script-reference.adoc#418: Is -d a valid option here?
  • solr-control-script-reference.adoc#800: -deleteConfig should be --delete-config
  • solr-control-script-reference.adoc#824: -deleteConfig should be --delete-config
  • solr-control-script-reference.adoc#983: -d should be --server-dir
  • post-tool.adoc#46: -d should be removed

@epugh
Copy link
Contributor Author

epugh commented Oct 11, 2024

Thanks for the additional review @malliaridis and I think I've got them sorted. I love how hte docs look with hte long form of the variables, much easier to read.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 11, 2024
@epugh epugh merged commit 19cf21e into apache:main Oct 11, 2024
4 of 5 checks passed
epugh added a commit that referenced this pull request Oct 11, 2024
Comment on lines 1527 to 1529
if not "!option!" equ "-s" if not "!option!" equ "-d" (
set "AUTH_PARAMS=!AUTH_PARAMS! !option! %%a"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this code block still gonna work correctly if --server-dir and --solr-home is used instead?

I feel like we have to somehow get rid of these lists of options, they seem very error-prone and can be easily forgotten when we make changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good darn question. I also think we have extra options parsing in the .cmd that doesn't exist in bin/solr... I think we have places where we could be leaning more on the existing java parsing...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened this: #2760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:cli documentation Improvements or additions to documentation start-scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants