When installing a package the index pattern installation functionality will use the latest package available in the registry to install the kibana index patterns.
Steps to reproduce:
- Start a fresh kibana and elasticsearch
- Force install the endpoint package version
0.13.1
curl --location --request POST 'http://elastic:changeme@localhost:5601/api/fleet/epm/packages/endpoint-0.13.1' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'kbn-xsrf: xxx' \
--data-raw '{
"force": true
}'
- Navigate to the index patterns in stack management and search for a term that should not exist in that version of the endpoint package (e.g.
caseless fields were added in 0.16.0)

elastic/endpoint-package#79
If you run the package registry locally you'll also notice that ingest manager made requests to download the requested package version and the latest version:
package-registry_1 | 2020/10/08 16:02:07 source.ip:, url.original: /package/endpoint/0.13.1
package-registry_1 | 2020/10/08 16:02:07 source.ip:, url.original: /package/endpoint/0.13.1/
package-registry_1 | 2020/10/08 16:02:07 source.ip:, url.original: /epr/endpoint/endpoint-0.13.1.zip
package-registry_1 | 2020/10/08 16:02:07 source.ip:, url.original: /package/endpoint/0.13.1
package-registry_1 | 2020/10/08 16:02:07 source.ip:, url.original: /package/endpoint/0.13.1/
package-registry_1 | 2020/10/08 16:02:08 source.ip:, url.original: /search
package-registry_1 | 2020/10/08 16:02:08 source.ip:, url.original: /package/endpoint/0.17.0-dev.0
package-registry_1 | 2020/10/08 16:02:08 source.ip:, url.original: /package/endpoint/0.17.0-dev.0/
package-registry_1 | 2020/10/08 16:02:08 source.ip:, url.original: /epr/endpoint/endpoint-0.17.0-dev.0.zip
package-registry_1 | 2020/10/08 16:02:08 source.ip:, url.original: /package/endpoint/0.17.0-dev.0
package-registry_1 | 2020/10/08 16:02:08 source.ip:, url.original: /package/endpoint/0.17.0-dev.0/
package-registry_1 | 2020/10/08 16:02:08 source.ip:, url.original: /package/endpoint/0.17.0-dev.0
package-registry_1 | 2020/10/08 16:02:08 source.ip:, url.original: /package/endpoint/0.17.0-dev.0/
Execution flow:
https://github.com/elastic/kibana/blob/master/x-pack/plugins/ingest_manager/server/services/epm/packages/install.ts#L375
calls
|
const installedPackages = await getPackageKeysByStatus( |
calls
|
acc.push({ pkgName: pkg.name, pkgVersion: pkg.version }); |
which uses the
version field which is populated by the registry's
/search response here:
|
const registryItems = await Registry.fetchList({ category, experimental }).then((items) => { |
which causes it to be version: 0.17.0-dev.0 instead of 0.13.1.
When installing a package the index pattern installation functionality will use the latest package available in the registry to install the kibana index patterns.
Steps to reproduce:
0.13.1caselessfields were added in0.16.0)elastic/endpoint-package#79
If you run the package registry locally you'll also notice that ingest manager made requests to download the requested package version and the latest version:
Execution flow:
https://github.com/elastic/kibana/blob/master/x-pack/plugins/ingest_manager/server/services/epm/packages/install.ts#L375
calls
kibana/x-pack/plugins/ingest_manager/server/services/epm/kibana/index_pattern/install.ts
Line 84 in 1cefc8e
calls
kibana/x-pack/plugins/ingest_manager/server/services/epm/packages/get.ts
Line 92 in 1cefc8e
versionfield which is populated by the registry's/searchresponse here:kibana/x-pack/plugins/ingest_manager/server/services/epm/packages/get.ts
Line 30 in 1cefc8e
which causes it to be version:
0.17.0-dev.0instead of0.13.1.