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

Add/fix wrong/missing "solr.home" to zkcli scripts #1798

Conversation

laminelam
Copy link
Contributor

@laminelam laminelam commented Jul 19, 2023

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

Description

"solr.home" is missing in zkcli.bat and wrong in zkcli.sh (solrHome instead of solr.home)

Solution

Add/replace the correct name.

Tests

Local tests for both scripts (.sh and .bat)

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

@epugh
Copy link
Contributor

epugh commented Jul 21, 2023

Thanks for looking at this.. one thought, would you want to add some BATS test to confirm these fixes? They have been great for verifying a lot of the SolrCLI things... Down the road, I hope to eliminate the need for the zkcli.sh completely, in favour of using bin/solr commands... Having some BATS tests would help that migration ;-).

@laminelam
Copy link
Contributor Author

laminelam commented Aug 10, 2023

Thanks for looking at this.. one thought, would you want to add some BATS test to confirm these fixes? They have been great for verifying a lot of the SolrCLI things... Down the road, I hope to eliminate the need for the zkcli.sh completely, in favour of using bin/solr commands... Having some BATS tests would help that migration ;-).

Hi @epugh
Thanks for the great suggestion. Didn't know about BATS.
I have added a couple of BATS tests to test both 'solr.home" and "solrhome" options.
Wondering if it's worth it keeping "solr.home" option, it's redundant and confusing

@epugh
Copy link
Contributor

epugh commented Aug 10, 2023

i had no idea that behind the zkcli scripts was a Java class! I think we should only have one variable name, whichever we have been using the most.

One more thought... I've been slowly moving various scripts under the "bin/solr" SolrCLI as tools. Once this get's merged, would you be interested in migrating this over to "bin/solr"? I wonder how much of what is in the "bin/solr zk" command is duplicated htere in zkcli?

@epugh
Copy link
Contributor

epugh commented Aug 10, 2023

Might be worth a grep thorugh the ref guide re "solrHome" versus "solr.home" too!

@laminelam
Copy link
Contributor Author

One more thought... I've been slowly moving various scripts under the "bin/solr" SolrCLI as tools. Once this get's merged, would you be interested in migrating this over to "bin/solr"? I wonder how much of what is in the "bin/solr zk" command is duplicated htere in zkcli?

Yes sure, will be more than happy to help on this.

@laminelam
Copy link
Contributor Author

Might be worth a grep thorugh the ref guide re "solrHome" versus "solr.home" too!

The only place where "solr.home" is used is here

@laminelam
Copy link
Contributor Author

Hi @epugh
I'd really appreciate if you could finish the review and, if approved, merge it.
I have other PRs waiting for this one before I could push them upstream. Thank you.

@epugh
Copy link
Contributor

epugh commented Aug 18, 2023

Hi @epugh I'd really appreciate if you could finish the review and, if approved, merge it. I have other PRs waiting for this one before I could push them upstream. Thank you.

are you going to change the -t to a -v for verbose and use that int he bats test? That way we don't have custom code that is ONLY used in a test.. it's a more generic feature... I'd love to see that...

@laminelam
Copy link
Contributor Author

Hi @epugh I'd really appreciate if you could finish the review and, if approved, merge it. I have other PRs waiting for this one before I could push them upstream. Thank you.

are you going to change the -t to a -v for verbose and use that int he bats test? That way we don't have custom code that is ONLY used in a test.. it's a more generic feature... I'd love to see that...

Done.
That's a good suggestion. I can add another PR verbosing more logs. For now it's just logging solrhome as it's the subject of this PR.

@epugh
Copy link
Contributor

epugh commented Aug 18, 2023 via email

@epugh epugh merged commit e0462e7 into apache:main Aug 21, 2023
4 checks passed
epugh pushed a commit that referenced this pull request Aug 21, 2023
---------

Co-authored-by: Lamine Idjeraoui <lidjeraoui@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants