gerlowskija commented on code in PR #3955:
URL: https://github.com/apache/solr/pull/3955#discussion_r2649284092
##########
solr/core/src/java/org/apache/solr/packagemanager/RepositoryManager.java:
##########
@@ -142,14 +143,15 @@ public void addRepository(String repoName, String uri)
throws Exception {
public void addKey(byte[] key, String destinationKeyFilename) throws
Exception {
// get solr_home directory from info servlet
- NamedList<Object> systemInfo =
- solrClient.request(
- new GenericSolrRequest(SolrRequest.METHOD.GET, "/solr" +
SYSTEM_INFO_PATH));
- String solrHome = (String) systemInfo.get("solr_home");
+ // This method is only called from PackageTool ("add-repo", or "add-key"),
where the Solr URL is
+ // normalized to remove the /solr path part
+ // So might as well ping the V2 API "/node/system" instead.
+ // Otherwise, this SystemInfoRequest ctr would need to set the full
/solr/admin/info/system path
+ SystemInfoResponse sysResponse = new
SystemInfoRequest("/node/system").process(solrClient);
Review Comment:
Yep - my comment above intended to be a caveat to Eric's initial point that
"in general we should just use v2 APIs". Was mostly clarifying that for his
benefit or anyone else reading...
The code here all LGTM 👍 , sorry if that was unclear 😬
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]