[
https://issues.apache.org/jira/browse/SOLR-18695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Pugh updated SOLR-18695:
-----------------------------
Description:
Every \{{*V2}} service factory in \{{services.js}} repeats the same setup for
the generated v2 client: set \{{basePath}} to \{{/api}}, delete the
\{{User-Agent}} default header, then instantiate the API. There are 16 copies.
This consolidates them into a single \{{newV2Api(apiName)}} helper. No behavior
change.
*Background:* this issue originally reported that the Collections screen fails
when the js-client bundle (\{{libs/solr/index.js}}) is missing, and proposed
looking up \{{solrApi}} lazily so the screen would degrade gracefully. The idea
was dropped:
* The bundle is only absent in builds made with \{{-PdisableJsClient=true}}.
Release artifacts always include it.
* The Admin UI tests now serve the rekaround that surfaced the problem isgone.
* Most screens now depend on the v2 collections, logging, node detection),so a
UI without the bundle isn't usable in any meaningful way. Making it optional
would add an untested fallback path.
The investigation turned up the dupli what this issue now covers.
was: the {{CollectionsV2}} service factory ({{{}services.js{}}}) references
the {{solrApi}} global at injection time; if {{libs/solr/index.js}} fails to
load, the whole {{CollectionsController}} fails and the screen is blank. Only
{{reloadCollection}} is used from that bundle — a lazy/optional lookup would
degrade gracefully. Workaround: tests serve a stub bundle. _Found by_
{{{}AdminUiSmokeTest{}}}; stub served by {{AdminUiTestBase}} for
{{{}AdminUiCollectionsScreenTest{}}}.
> Admin UI share v2 API client setup across *V2 services
> ------------------------------------------------------
>
> Key: SOLR-18695
> URL: https://issues.apache.org/jira/browse/SOLR-18695
> Project: Solr
> Issue Type: Sub-task
> Reporter: Eric Pugh
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Every \{{*V2}} service factory in \{{services.js}} repeats the same setup for
> the generated v2 client: set \{{basePath}} to \{{/api}}, delete the
> \{{User-Agent}} default header, then instantiate the API. There are 16 copies.
> This consolidates them into a single \{{newV2Api(apiName)}} helper. No
> behavior change.
> *Background:* this issue originally reported that the Collections screen
> fails when the js-client bundle (\{{libs/solr/index.js}}) is missing, and
> proposed looking up \{{solrApi}} lazily so the screen would degrade
> gracefully. The idea was dropped:
> * The bundle is only absent in builds made with \{{-PdisableJsClient=true}}.
> Release artifacts always include it.
> * The Admin UI tests now serve the rekaround that surfaced the problem isgone.
> * Most screens now depend on the v2 collections, logging, node detection),so
> a UI without the bundle isn't usable in any meaningful way. Making it
> optional would add an untested fallback path.
> The investigation turned up the dupli what this issue now covers.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]