Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ent Search Plugin] Fix loading initial plugin data, save kbn version in kea, fix connector img version #199777

Merged
merged 6 commits into from
Nov 18, 2024

Conversation

jedrazb
Copy link
Member

@jedrazb jedrazb commented Nov 12, 2024

Summary

PR is a bugfix to dynamically populate the version of the connectors docker image shown in the onboarding. It's hardcoded to 8.15.0 now ....

Ideally we want to backport this to 8.16.1 +

Changes:

  • Given that we are already getting kibanaVersion from the backend, I'm saving the version in KibanaLogic reducer and use it to popuale the docker image version
  • I realised that because of this change ~10 months ago, we stopped passing plugin data, due to if (!this.config.host) return; // No API to call therefore I removed this line to fix this. Why I think it's safe to merge?
    • It was only added 10 months ago, before things were working without this extra if statement
    • The backend logic handles the non-existent host: see here
    • We are guaranteed that other config fields exist, see config schema
Screenshot 2024-11-13 at 10 51 36

Checklist

Delete any items that are not applicable to this PR.

  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list

@jedrazb jedrazb changed the title [WIP] Attempt to fix hardcoded version of connectors image [Ent Search Plugin] Fix loading initial plugin data, save kbn version in kea, fix connector img version Nov 13, 2024
@jedrazb jedrazb marked this pull request as ready for review November 13, 2024 09:52
@jedrazb jedrazb requested a review from a team as a code owner November 13, 2024 09:52
@jedrazb jedrazb added v9.0.0 v8.17.0 v8.16.1 backport release_note:skip Skip the PR/issue when compiling release notes labels Nov 13, 2024
@jedrazb
Copy link
Member Author

jedrazb commented Nov 18, 2024

@elasticmachine merge upstream

@jedrazb jedrazb enabled auto-merge (squash) November 18, 2024 08:24
@jedrazb jedrazb merged commit 5d00a0a into elastic:main Nov 18, 2024
23 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11890254716

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #19 / discover/group4 adhoc data views should open saved search by navigation to context from embeddable

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 2.6MB 2.6MB +150.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
enterpriseSearch 53.8KB 53.8KB -18.0B

History

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 18, 2024
… in kea, fix connector img version (elastic#199777)

## Summary

PR is a bugfix to dynamically populate the `version` of the connectors
docker image shown in the onboarding. It's hardcoded to `8.15.0` now
....

Ideally we want to backport this to 8.16.1 +

Changes:
- Given that we are already getting
[kibanaVersion](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/applications/index.tsx#L65)
from the
[backend](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/plugin.ts#L212),
I'm saving the version in `KibanaLogic` reducer and use it to popuale
the docker image version
- I realised that because of [this
change](elastic@664c1a0#diff-19a48c92980fd550e48c5e1d4d1f9a2bec4d309909b7cfa693264c92b387fe3dR95)
~10 months ago, we stopped passing plugin data, due to `if
(!this.config.host) return; // No API to call` therefore I removed this
line to fix this. Why I think it's safe to merge?
- It was only added 10 months ago, before things were working without
this extra if statement
- The backend logic handles the non-existent host: see
[here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts#L45-L61)
- We are guaranteed that other config fields exist, see [config
schema](https://github.com/elastic/kibana/blob/d276b4899533b0bde2038c7fedfed7c30a74a80b/x-pack/plugins/enterprise_search/server/index.ts#L16-L42)

<img width="1204" alt="Screenshot 2024-11-13 at 10 51 36"
src="https://github.com/user-attachments/assets/dbd2395b-00e5-4331-a9be-cb2a87133321">

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 5d00a0a)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 18, 2024
… in kea, fix connector img version (elastic#199777)

## Summary

PR is a bugfix to dynamically populate the `version` of the connectors
docker image shown in the onboarding. It's hardcoded to `8.15.0` now
....

Ideally we want to backport this to 8.16.1 +

Changes:
- Given that we are already getting
[kibanaVersion](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/applications/index.tsx#L65)
from the
[backend](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/plugin.ts#L212),
I'm saving the version in `KibanaLogic` reducer and use it to popuale
the docker image version
- I realised that because of [this
change](elastic@664c1a0#diff-19a48c92980fd550e48c5e1d4d1f9a2bec4d309909b7cfa693264c92b387fe3dR95)
~10 months ago, we stopped passing plugin data, due to `if
(!this.config.host) return; // No API to call` therefore I removed this
line to fix this. Why I think it's safe to merge?
- It was only added 10 months ago, before things were working without
this extra if statement
- The backend logic handles the non-existent host: see
[here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts#L45-L61)
- We are guaranteed that other config fields exist, see [config
schema](https://github.com/elastic/kibana/blob/d276b4899533b0bde2038c7fedfed7c30a74a80b/x-pack/plugins/enterprise_search/server/index.ts#L16-L42)

<img width="1204" alt="Screenshot 2024-11-13 at 10 51 36"
src="https://github.com/user-attachments/assets/dbd2395b-00e5-4331-a9be-cb2a87133321">

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 5d00a0a)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 18, 2024
…version in kea, fix connector img version (#199777) (#200528)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Ent Search Plugin] Fix loading initial plugin data, save kbn version
in kea, fix connector img version
(#199777)](#199777)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jedr
Blaszyk","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-18T10:13:19Z","message":"[Ent
Search Plugin] Fix loading initial plugin data, save kbn version in kea,
fix connector img version (#199777)\n\n## Summary\r\n\r\nPR is a bugfix
to dynamically populate the `version` of the connectors\r\ndocker image
shown in the onboarding. It's hardcoded to `8.15.0`
now\r\n....\r\n\r\nIdeally we want to backport this to 8.16.1
+\r\n\r\nChanges:\r\n- Given that we are already
getting\r\n[kibanaVersion](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/applications/index.tsx#L65)\r\nfrom
the\r\n[backend](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/plugin.ts#L212),\r\nI'm
saving the version in `KibanaLogic` reducer and use it to popuale\r\nthe
docker image version\r\n- I realised that because of
[this\r\nchange](https://github.com/elastic/kibana/commit/664c1a0a08003f82cb88c9b4a51f194fbb42cd84#diff-19a48c92980fd550e48c5e1d4d1f9a2bec4d309909b7cfa693264c92b387fe3dR95)\r\n~10
months ago, we stopped passing plugin data, due to
`if\r\n(!this.config.host) return; // No API to call` therefore I
removed this\r\nline to fix this. Why I think it's safe to merge?\r\n-
It was only added 10 months ago, before things were working
without\r\nthis extra if statement\r\n- The backend logic handles the
non-existent host:
see\r\n[here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts#L45-L61)\r\n-
We are guaranteed that other config fields exist, see
[config\r\nschema](https://github.com/elastic/kibana/blob/d276b4899533b0bde2038c7fedfed7c30a74a80b/x-pack/plugins/enterprise_search/server/index.ts#L16-L42)\r\n\r\n<img
width=\"1204\" alt=\"Screenshot 2024-11-13 at 10 51
36\"\r\nsrc=\"https://github.com/user-attachments/assets/dbd2395b-00e5-4331-a9be-cb2a87133321\">\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"5d00a0a098930b2292ea7777cd1ee9f46a91a778","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","v8.17.0","v8.16.1"],"title":"[Ent
Search Plugin] Fix loading initial plugin data, save kbn version in kea,
fix connector img
version","number":199777,"url":"https://github.com/elastic/kibana/pull/199777","mergeCommit":{"message":"[Ent
Search Plugin] Fix loading initial plugin data, save kbn version in kea,
fix connector img version (#199777)\n\n## Summary\r\n\r\nPR is a bugfix
to dynamically populate the `version` of the connectors\r\ndocker image
shown in the onboarding. It's hardcoded to `8.15.0`
now\r\n....\r\n\r\nIdeally we want to backport this to 8.16.1
+\r\n\r\nChanges:\r\n- Given that we are already
getting\r\n[kibanaVersion](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/applications/index.tsx#L65)\r\nfrom
the\r\n[backend](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/plugin.ts#L212),\r\nI'm
saving the version in `KibanaLogic` reducer and use it to popuale\r\nthe
docker image version\r\n- I realised that because of
[this\r\nchange](https://github.com/elastic/kibana/commit/664c1a0a08003f82cb88c9b4a51f194fbb42cd84#diff-19a48c92980fd550e48c5e1d4d1f9a2bec4d309909b7cfa693264c92b387fe3dR95)\r\n~10
months ago, we stopped passing plugin data, due to
`if\r\n(!this.config.host) return; // No API to call` therefore I
removed this\r\nline to fix this. Why I think it's safe to merge?\r\n-
It was only added 10 months ago, before things were working
without\r\nthis extra if statement\r\n- The backend logic handles the
non-existent host:
see\r\n[here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts#L45-L61)\r\n-
We are guaranteed that other config fields exist, see
[config\r\nschema](https://github.com/elastic/kibana/blob/d276b4899533b0bde2038c7fedfed7c30a74a80b/x-pack/plugins/enterprise_search/server/index.ts#L16-L42)\r\n\r\n<img
width=\"1204\" alt=\"Screenshot 2024-11-13 at 10 51
36\"\r\nsrc=\"https://github.com/user-attachments/assets/dbd2395b-00e5-4331-a9be-cb2a87133321\">\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"5d00a0a098930b2292ea7777cd1ee9f46a91a778"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199777","number":199777,"mergeCommit":{"message":"[Ent
Search Plugin] Fix loading initial plugin data, save kbn version in kea,
fix connector img version (#199777)\n\n## Summary\r\n\r\nPR is a bugfix
to dynamically populate the `version` of the connectors\r\ndocker image
shown in the onboarding. It's hardcoded to `8.15.0`
now\r\n....\r\n\r\nIdeally we want to backport this to 8.16.1
+\r\n\r\nChanges:\r\n- Given that we are already
getting\r\n[kibanaVersion](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/applications/index.tsx#L65)\r\nfrom
the\r\n[backend](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/plugin.ts#L212),\r\nI'm
saving the version in `KibanaLogic` reducer and use it to popuale\r\nthe
docker image version\r\n- I realised that because of
[this\r\nchange](https://github.com/elastic/kibana/commit/664c1a0a08003f82cb88c9b4a51f194fbb42cd84#diff-19a48c92980fd550e48c5e1d4d1f9a2bec4d309909b7cfa693264c92b387fe3dR95)\r\n~10
months ago, we stopped passing plugin data, due to
`if\r\n(!this.config.host) return; // No API to call` therefore I
removed this\r\nline to fix this. Why I think it's safe to merge?\r\n-
It was only added 10 months ago, before things were working
without\r\nthis extra if statement\r\n- The backend logic handles the
non-existent host:
see\r\n[here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts#L45-L61)\r\n-
We are guaranteed that other config fields exist, see
[config\r\nschema](https://github.com/elastic/kibana/blob/d276b4899533b0bde2038c7fedfed7c30a74a80b/x-pack/plugins/enterprise_search/server/index.ts#L16-L42)\r\n\r\n<img
width=\"1204\" alt=\"Screenshot 2024-11-13 at 10 51
36\"\r\nsrc=\"https://github.com/user-attachments/assets/dbd2395b-00e5-4331-a9be-cb2a87133321\">\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"5d00a0a098930b2292ea7777cd1ee9f46a91a778"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jedr Blaszyk <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 18, 2024
…ersion in kea, fix connector img version (#199777) (#200529)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Ent Search Plugin] Fix loading initial plugin data, save kbn version
in kea, fix connector img version
(#199777)](#199777)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jedr
Blaszyk","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-18T10:13:19Z","message":"[Ent
Search Plugin] Fix loading initial plugin data, save kbn version in kea,
fix connector img version (#199777)\n\n## Summary\r\n\r\nPR is a bugfix
to dynamically populate the `version` of the connectors\r\ndocker image
shown in the onboarding. It's hardcoded to `8.15.0`
now\r\n....\r\n\r\nIdeally we want to backport this to 8.16.1
+\r\n\r\nChanges:\r\n- Given that we are already
getting\r\n[kibanaVersion](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/applications/index.tsx#L65)\r\nfrom
the\r\n[backend](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/plugin.ts#L212),\r\nI'm
saving the version in `KibanaLogic` reducer and use it to popuale\r\nthe
docker image version\r\n- I realised that because of
[this\r\nchange](https://github.com/elastic/kibana/commit/664c1a0a08003f82cb88c9b4a51f194fbb42cd84#diff-19a48c92980fd550e48c5e1d4d1f9a2bec4d309909b7cfa693264c92b387fe3dR95)\r\n~10
months ago, we stopped passing plugin data, due to
`if\r\n(!this.config.host) return; // No API to call` therefore I
removed this\r\nline to fix this. Why I think it's safe to merge?\r\n-
It was only added 10 months ago, before things were working
without\r\nthis extra if statement\r\n- The backend logic handles the
non-existent host:
see\r\n[here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts#L45-L61)\r\n-
We are guaranteed that other config fields exist, see
[config\r\nschema](https://github.com/elastic/kibana/blob/d276b4899533b0bde2038c7fedfed7c30a74a80b/x-pack/plugins/enterprise_search/server/index.ts#L16-L42)\r\n\r\n<img
width=\"1204\" alt=\"Screenshot 2024-11-13 at 10 51
36\"\r\nsrc=\"https://github.com/user-attachments/assets/dbd2395b-00e5-4331-a9be-cb2a87133321\">\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"5d00a0a098930b2292ea7777cd1ee9f46a91a778","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","v8.17.0","v8.16.1"],"title":"[Ent
Search Plugin] Fix loading initial plugin data, save kbn version in kea,
fix connector img
version","number":199777,"url":"https://github.com/elastic/kibana/pull/199777","mergeCommit":{"message":"[Ent
Search Plugin] Fix loading initial plugin data, save kbn version in kea,
fix connector img version (#199777)\n\n## Summary\r\n\r\nPR is a bugfix
to dynamically populate the `version` of the connectors\r\ndocker image
shown in the onboarding. It's hardcoded to `8.15.0`
now\r\n....\r\n\r\nIdeally we want to backport this to 8.16.1
+\r\n\r\nChanges:\r\n- Given that we are already
getting\r\n[kibanaVersion](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/applications/index.tsx#L65)\r\nfrom
the\r\n[backend](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/plugin.ts#L212),\r\nI'm
saving the version in `KibanaLogic` reducer and use it to popuale\r\nthe
docker image version\r\n- I realised that because of
[this\r\nchange](https://github.com/elastic/kibana/commit/664c1a0a08003f82cb88c9b4a51f194fbb42cd84#diff-19a48c92980fd550e48c5e1d4d1f9a2bec4d309909b7cfa693264c92b387fe3dR95)\r\n~10
months ago, we stopped passing plugin data, due to
`if\r\n(!this.config.host) return; // No API to call` therefore I
removed this\r\nline to fix this. Why I think it's safe to merge?\r\n-
It was only added 10 months ago, before things were working
without\r\nthis extra if statement\r\n- The backend logic handles the
non-existent host:
see\r\n[here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts#L45-L61)\r\n-
We are guaranteed that other config fields exist, see
[config\r\nschema](https://github.com/elastic/kibana/blob/d276b4899533b0bde2038c7fedfed7c30a74a80b/x-pack/plugins/enterprise_search/server/index.ts#L16-L42)\r\n\r\n<img
width=\"1204\" alt=\"Screenshot 2024-11-13 at 10 51
36\"\r\nsrc=\"https://github.com/user-attachments/assets/dbd2395b-00e5-4331-a9be-cb2a87133321\">\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"5d00a0a098930b2292ea7777cd1ee9f46a91a778"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199777","number":199777,"mergeCommit":{"message":"[Ent
Search Plugin] Fix loading initial plugin data, save kbn version in kea,
fix connector img version (#199777)\n\n## Summary\r\n\r\nPR is a bugfix
to dynamically populate the `version` of the connectors\r\ndocker image
shown in the onboarding. It's hardcoded to `8.15.0`
now\r\n....\r\n\r\nIdeally we want to backport this to 8.16.1
+\r\n\r\nChanges:\r\n- Given that we are already
getting\r\n[kibanaVersion](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/applications/index.tsx#L65)\r\nfrom
the\r\n[backend](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/plugin.ts#L212),\r\nI'm
saving the version in `KibanaLogic` reducer and use it to popuale\r\nthe
docker image version\r\n- I realised that because of
[this\r\nchange](https://github.com/elastic/kibana/commit/664c1a0a08003f82cb88c9b4a51f194fbb42cd84#diff-19a48c92980fd550e48c5e1d4d1f9a2bec4d309909b7cfa693264c92b387fe3dR95)\r\n~10
months ago, we stopped passing plugin data, due to
`if\r\n(!this.config.host) return; // No API to call` therefore I
removed this\r\nline to fix this. Why I think it's safe to merge?\r\n-
It was only added 10 months ago, before things were working
without\r\nthis extra if statement\r\n- The backend logic handles the
non-existent host:
see\r\n[here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts#L45-L61)\r\n-
We are guaranteed that other config fields exist, see
[config\r\nschema](https://github.com/elastic/kibana/blob/d276b4899533b0bde2038c7fedfed7c30a74a80b/x-pack/plugins/enterprise_search/server/index.ts#L16-L42)\r\n\r\n<img
width=\"1204\" alt=\"Screenshot 2024-11-13 at 10 51
36\"\r\nsrc=\"https://github.com/user-attachments/assets/dbd2395b-00e5-4331-a9be-cb2a87133321\">\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"5d00a0a098930b2292ea7777cd1ee9f46a91a778"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jedr Blaszyk <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
… in kea, fix connector img version (elastic#199777)

## Summary

PR is a bugfix to dynamically populate the `version` of the connectors
docker image shown in the onboarding. It's hardcoded to `8.15.0` now
....

Ideally we want to backport this to 8.16.1 +

Changes:
- Given that we are already getting
[kibanaVersion](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/applications/index.tsx#L65)
from the
[backend](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/plugin.ts#L212),
I'm saving the version in `KibanaLogic` reducer and use it to popuale
the docker image version
- I realised that because of [this
change](elastic@664c1a0#diff-19a48c92980fd550e48c5e1d4d1f9a2bec4d309909b7cfa693264c92b387fe3dR95)
~10 months ago, we stopped passing plugin data, due to `if
(!this.config.host) return; // No API to call` therefore I removed this
line to fix this. Why I think it's safe to merge?
- It was only added 10 months ago, before things were working without
this extra if statement
- The backend logic handles the non-existent host: see
[here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts#L45-L61)
- We are guaranteed that other config fields exist, see [config
schema](https://github.com/elastic/kibana/blob/d276b4899533b0bde2038c7fedfed7c30a74a80b/x-pack/plugins/enterprise_search/server/index.ts#L16-L42)

<img width="1204" alt="Screenshot 2024-11-13 at 10 51 36"
src="https://github.com/user-attachments/assets/dbd2395b-00e5-4331-a9be-cb2a87133321">

### Checklist

Delete any items that are not applicable to this PR.


- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_note:skip Skip the PR/issue when compiling release notes v8.16.1 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants