used EnvUtils for system properties in core#4629
Open
iprithv wants to merge 3 commits into
Open
Conversation
epugh
reviewed
Jul 12, 2026
| String solrHome = cli.getOptionValue(SOLR_HOME_OPTION); | ||
| if (StrUtils.isNullOrEmpty(solrHome)) { | ||
| solrHome = System.getProperty("solr.home"); | ||
| solrHome = EnvUtils.getProperty("solr.home", EnvUtils.getProperty("solr.solr.home")); |
Contributor
There was a problem hiding this comment.
The solr.solr.home thing was always a bit werid... But is a "thing". What prompted this change here?
Author
There was a problem hiding this comment.
my bad, I've fixed ZkCpTool to use EnvUtils.getProperty("solr.home") to preserve the original behaviour. Thanks!
e2d9407 to
8df1569
Compare
epugh
reviewed
Jul 15, 2026
| final String prop = "solr.solr.home"; | ||
| source = "system property: " + prop; | ||
| home = System.getProperty(prop); | ||
| home = EnvUtils.getProperty(prop); |
Contributor
There was a problem hiding this comment.
bit nervous on this, but dug in more and looks okay!
Contributor
|
@iprithv can you add a changelog entry? This is a new feature to Solr, that you can set proeprties via environment variables! |
Author
|
sure, added changelog. thanks! |
ab7bfd6 to
009a724
Compare
Contributor
it burped ;-). Can you tweak the type! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
replaced direct
System.getProperty(...)/System.getenvcalls for Solr configuration properties withEnvUtilsequivalents throughout the core module. this provides consistent support forSOLR_*environment variables (and the automaticSOLR_FOO_BAR→solr.foo.barconversion) in all core startup and configuration paths.