You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "epugh (via GitHub)" <gi...@apache.org> on 2025/08/23 00:03:29 UTC
[PR] SOLR-17864: Migrate authentication.plugin and basicauth to modern equivalents. [solr]
epugh opened a new pull request, #3500:
URL: https://github.com/apache/solr/pull/3500
https://issues.apache.org/jira/browse/SOLR-17864
authentication.plugin=solr.security.auth.plugin
basicauth=solr.security.auth.basicauth.credentials
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17864: Migrate System Properties to modern equivalents. [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #3500:
URL: https://github.com/apache/solr/pull/3500#discussion_r2295536028
##########
solr/core/src/java/org/apache/solr/handler/configsets/ConfigSetAPIBase.java:
##########
@@ -96,10 +96,10 @@ protected void runConfigSetCommand(
}
protected void ensureConfigSetUploadEnabled() {
- if (!"true".equals(System.getProperty("configset.upload.enabled", "true"))) {
+ if (!"true".equals(System.getProperty("solr.configset.upload.enabled", "true"))) {
Review Comment:
It could, but it turns out it doesn't have too! I almost added a JIRA to remind me to add System.getProperty to forbidden apis....
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17864: Migrate System Properties to modern equivalents. [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #3500:
URL: https://github.com/apache/solr/pull/3500#discussion_r2296343319
##########
solr/core/src/java/org/apache/solr/core/NodeConfig.java:
##########
@@ -861,25 +861,17 @@ public NodeConfigBuilder setHiddenSysProps(String hiddenSysProps) {
}
/**
- * Finds list of hiddenSysProps requested by system property or environment variable or the
- * default
+ * Finds list of hiddenSysProps requested in priority of solr.xml, system property or the
+ * default set
*
- * @return set of raw hidden sysProps, may be regex
+ * @return set of raw hidden system properties, may be regex
*/
private Set<String> resolveHiddenSysPropsFromSysPropOrEnvOrDefault(String hiddenSysProps) {
Review Comment:
> Also, maybe using EnvUtils would let me change this method to resolveHiddenSysPropsFromEnvUtilsOrDefault as a name???
Yes exactly! This is a large part of the very point of EnvUtils! Jan introduced EnvUtils but didn't convert our codebase to use it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17864: Migrate authentication.plugin and basicauth to modern equivalents. [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #3500:
URL: https://github.com/apache/solr/pull/3500#discussion_r2295029647
##########
solr/core/src/java/org/apache/solr/core/NodeConfig.java:
##########
@@ -861,25 +861,17 @@ public NodeConfigBuilder setHiddenSysProps(String hiddenSysProps) {
}
/**
- * Finds list of hiddenSysProps requested by system property or environment variable or the
- * default
+ * Finds list of hiddenSysProps requested in priority of solr.xml, system property or the
+ * default set
*
- * @return set of raw hidden sysProps, may be regex
+ * @return set of raw hidden system properties, may be regex
*/
private Set<String> resolveHiddenSysPropsFromSysPropOrEnvOrDefault(String hiddenSysProps) {
Review Comment:
shouldn't this use EnvUtils?
##########
solr/core/src/java/org/apache/solr/handler/configsets/ConfigSetAPIBase.java:
##########
@@ -96,10 +96,10 @@ protected void runConfigSetCommand(
}
protected void ensureConfigSetUploadEnabled() {
- if (!"true".equals(System.getProperty("configset.upload.enabled", "true"))) {
+ if (!"true".equals(System.getProperty("solr.configset.upload.enabled", "true"))) {
Review Comment:
shouldn't this use EnvUtils?
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java:
##########
@@ -89,7 +89,7 @@ public abstract class CloudSolrClient extends SolrClient {
// no of times collection state to be reloaded if stale state error is received
private static final int MAX_STALE_RETRIES =
- Integer.parseInt(System.getProperty("cloudSolrClientMaxStaleRetries", "5"));
+ Integer.parseInt(System.getProperty("solr.solrj.cloud.max.stale.retries", "5"));
Review Comment:
shouldn't this use EnvUtils?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17864: Migrate System Properties to modern equivalents. [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #3500:
URL: https://github.com/apache/solr/pull/3500#discussion_r2295566084
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java:
##########
@@ -89,7 +89,7 @@ public abstract class CloudSolrClient extends SolrClient {
// no of times collection state to be reloaded if stale state error is received
private static final int MAX_STALE_RETRIES =
- Integer.parseInt(System.getProperty("cloudSolrClientMaxStaleRetries", "5"));
+ Integer.parseInt(System.getProperty("solr.solrj.cloud.max.stale.retries", "5"));
Review Comment:
It could, and indeed it would be shorter... Do you think I should just start using EnvUtils everywhere instead of these equivalents?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17864: Migrate System Properties to modern equivalents. [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #3500:
URL: https://github.com/apache/solr/pull/3500#discussion_r2295534211
##########
solr/core/src/java/org/apache/solr/core/NodeConfig.java:
##########
@@ -861,25 +861,17 @@ public NodeConfigBuilder setHiddenSysProps(String hiddenSysProps) {
}
/**
- * Finds list of hiddenSysProps requested by system property or environment variable or the
- * default
+ * Finds list of hiddenSysProps requested in priority of solr.xml, system property or the
+ * default set
*
- * @return set of raw hidden sysProps, may be regex
+ * @return set of raw hidden system properties, may be regex
*/
private Set<String> resolveHiddenSysPropsFromSysPropOrEnvOrDefault(String hiddenSysProps) {
Review Comment:
I kind of wondered about this... So, what I discovered about EnvUtils is that it, on Solr startup, merges the environment variables and system properties into one set, and puts them all in System.getProperties. I actually did some work early on to migrated to using the EnvUtils equivalents of System.getProperty, and then backed away as "too much", but maybe I should have done that. Also, maybe using EnvUtils would let me change this method to `resolveHiddenSysPropsFromEnvUtilsOrDefault` as a name???
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17864: Migrate System Properties to modern equivalents. [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #3500:
URL: https://github.com/apache/solr/pull/3500#issuecomment-3216626165
Pending the discussion on using `EnvUtils`, I think this PR is ready. (and honestly, we could save the EnvUtils changes for another PR more globally!). I've run the tests locally, and had Crave work as well. Right now Crave seems a bit unhappy.... I'll kick off another attmept...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17864: Migrate System Properties to modern equivalents. [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #3500:
URL: https://github.com/apache/solr/pull/3500#discussion_r2296343712
##########
solr/core/src/java/org/apache/solr/handler/configsets/ConfigSetAPIBase.java:
##########
@@ -96,10 +96,10 @@ protected void runConfigSetCommand(
}
protected void ensureConfigSetUploadEnabled() {
- if (!"true".equals(System.getProperty("configset.upload.enabled", "true"))) {
+ if (!"true".equals(System.getProperty("solr.configset.upload.enabled", "true"))) {
Review Comment:
forbidden apis is too much. There are some sys props that aren't related to EnvUtils like testing/internal ones that don't start with "solr".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17864: Migrate System Properties to modern equivalents. [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #3500:
URL: https://github.com/apache/solr/pull/3500#discussion_r2296675778
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java:
##########
@@ -89,7 +89,7 @@ public abstract class CloudSolrClient extends SolrClient {
// no of times collection state to be reloaded if stale state error is received
private static final int MAX_STALE_RETRIES =
- Integer.parseInt(System.getProperty("cloudSolrClientMaxStaleRetries", "5"));
+ Integer.parseInt(System.getProperty("solr.solrj.cloud.max.stale.retries", "5"));
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17864: Migrate System Properties to modern equivalents. [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh merged PR #3500:
URL: https://github.com/apache/solr/pull/3500
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17864: Migrate System Properties to modern equivalents. [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #3500:
URL: https://github.com/apache/solr/pull/3500#discussion_r2296677191
##########
solr/core/src/java/org/apache/solr/handler/configsets/ConfigSetAPIBase.java:
##########
@@ -96,10 +96,10 @@ protected void runConfigSetCommand(
}
protected void ensureConfigSetUploadEnabled() {
- if (!"true".equals(System.getProperty("configset.upload.enabled", "true"))) {
+ if (!"true".equals(System.getProperty("solr.configset.upload.enabled", "true"))) {
Review Comment:
okay.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17864: Migrate System Properties to modern equivalents. [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #3500:
URL: https://github.com/apache/solr/pull/3500#discussion_r2296342819
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java:
##########
@@ -89,7 +89,7 @@ public abstract class CloudSolrClient extends SolrClient {
// no of times collection state to be reloaded if stale state error is received
private static final int MAX_STALE_RETRIES =
- Integer.parseInt(System.getProperty("cloudSolrClientMaxStaleRetries", "5"));
+ Integer.parseInt(System.getProperty("solr.solrj.cloud.max.stale.retries", "5"));
Review Comment:
Yes; use EnvUtils to read any property that starts with "solr". Consistency. Your PRs here are the perfect time to do this at the same time as renames. I don't suggest you necessarily touch additional lines, but at least update the lines you need to touch for sys prop name changes.
CC @janhoy
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org