-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[8.19] Fix embeddings model dropdown with legacy endpoint on upgrade (#226878) #228343
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
Merged
arturoliduena
merged 4 commits into
elastic:8.19
from
arturoliduena:backport/8.19/pr-226878
Jul 17, 2025
Merged
[8.19] Fix embeddings model dropdown with legacy endpoint on upgrade (#226878) #228343
arturoliduena
merged 4 commits into
elastic:8.19
from
arturoliduena:backport/8.19/pr-226878
Jul 17, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…c#226878) ## Summary Closes elastic#226350 When upgrading from 8.18 to 8.19 (or from 9.0 to 9.1), if the knowledge base was already installed, there was a bug in the dropdown for "Set text embeddings model" where the dropdown would be empty (see screenshot below)  To resolve this, after discussing with the team, we decided to implement a fix and treat the legacy endpoint as if it was the pre-configured ELSER v2 endpoint. Now, when a user upgrades after having already installed the knowledge base with the legacy inference endpoint, they will see the "ELSER v2" endpoint pre-selected. They will be able to switch to E5. If they then want to switch back to ELSER, they will switch to the pre-configured ELSER v2 endpoint. If they never switch, they will stay on the legacy endpoint. In the future, we might want to fix this with a migration on startup. ## Testing See screen recording. ### Classic inference endpoint https://github.com/user-attachments/assets/06273a3f-6bbf-46b3-87ab-2467345a32b6 ### EIS inference endpoint https://github.com/user-attachments/assets/9d499936-e6b6-4c28-bf3d-195357354b28 ### Testing instructions * Deploy version 8.18, got to Kibana and setup knowledge base. Also make sure you have a connector setup. Note: start es with the command `yarn es snapshot --license trial -E path.data=/<PATH_TO_DATA_DIRECTORY>` so you can save the data in a separate directory. * * Now, deploy version 8.19 using the same command from above. Apply the changes from this PR on top of the branch. * Go to Kibana again, and go to the assistant settings. You should now see the "Set text embeddings model" option with ELSER v2 pre-selected and the "update model" button disabled. Choosing E5 from the dropdown should enable the button. You can also try with version 9.0 -> 9.1 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit f45e5f1) # Conflicts: # x-pack/solutions/observability/plugins/observability_ai_assistant_management/public/helpers/inference_utils.ts # x-pack/solutions/observability/plugins/observability_ai_assistant_management/public/routes/components/settings_tab/change_kb_model.test.tsx # x-pack/solutions/observability/plugins/observability_ai_assistant_management/public/routes/components/settings_tab/product_doc_entry.test.tsx # x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.json
2 tasks
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
neptunian
approved these changes
Jul 16, 2025
eleonoramicozzi
added a commit
that referenced
this pull request
Jul 17, 2025
## Summary This test was failing in this backport PR #228343 After investigating, I found that it's because the `findByText(elserTitle)` was finding 2 elements with that text (the dropdown button itself, and the dropdown option), thus failing. In 9.1 and 9.2, for some reason the dropdown was not opening before that findByText was executed, hence there was only 1 instance of that text, but the test was not actually testing clicking the option. By adding data-test-subj, we ensure that the dropdown is open, and that we are clicking on the right option. This change has already been made on the backport PR for 8.19, this PR adds it to 9.1 and 9.2. Tested in 9.2, 9.1 and 8.9 using screen.debug() to check that the drodpown was being opened, and the tests passed on all branches.
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jul 17, 2025
## Summary This test was failing in this backport PR elastic#228343 After investigating, I found that it's because the `findByText(elserTitle)` was finding 2 elements with that text (the dropdown button itself, and the dropdown option), thus failing. In 9.1 and 9.2, for some reason the dropdown was not opening before that findByText was executed, hence there was only 1 instance of that text, but the test was not actually testing clicking the option. By adding data-test-subj, we ensure that the dropdown is open, and that we are clicking on the right option. This change has already been made on the backport PR for 8.19, this PR adds it to 9.1 and 9.2. Tested in 9.2, 9.1 and 8.9 using screen.debug() to check that the drodpown was being opened, and the tests passed on all branches. (cherry picked from commit 91c4e9d)
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
|
kibanamachine
added a commit
that referenced
this pull request
Jul 17, 2025
… (#228469) # Backport This will backport the following commits from `main` to `9.1`: - [Add data-test-subj to dropdown options and adjust tests (#228433)](#228433) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Eleonora","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-07-17T14:08:45Z","message":"Add data-test-subj to dropdown options and adjust tests (#228433)\n\n## Summary\n\nThis test was failing in this backport PR\nhttps://github.com//pull/228343\nAfter investigating, I found that it's because the\n`findByText(elserTitle)` was finding 2 elements with that text (the\ndropdown button itself, and the dropdown option), thus failing.\nIn 9.1 and 9.2, for some reason the dropdown was not opening before that\nfindByText was executed, hence there was only 1 instance of that text,\nbut the test was not actually testing clicking the option.\n\nBy adding data-test-subj, we ensure that the dropdown is open, and that\nwe are clicking on the right option.\nThis change has already been made on the backport PR for 8.19, this PR\nadds it to 9.1 and 9.2.\n\nTested in 9.2, 9.1 and 8.9 using screen.debug() to check that the\ndrodpown was being opened, and the tests passed on all branches.","sha":"91c4e9d61bf03a887014811dedf14383600c4f4d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Obs AI Assistant","ci:project-deploy-observability","backport:version","v9.1.0","v9.2.0"],"title":"Add data-test-subj to dropdown options and adjust tests","number":228433,"url":"https://github.com/elastic/kibana/pull/228433","mergeCommit":{"message":"Add data-test-subj to dropdown options and adjust tests (#228433)\n\n## Summary\n\nThis test was failing in this backport PR\nhttps://github.com//pull/228343\nAfter investigating, I found that it's because the\n`findByText(elserTitle)` was finding 2 elements with that text (the\ndropdown button itself, and the dropdown option), thus failing.\nIn 9.1 and 9.2, for some reason the dropdown was not opening before that\nfindByText was executed, hence there was only 1 instance of that text,\nbut the test was not actually testing clicking the option.\n\nBy adding data-test-subj, we ensure that the dropdown is open, and that\nwe are clicking on the right option.\nThis change has already been made on the backport PR for 8.19, this PR\nadds it to 9.1 and 9.2.\n\nTested in 9.2, 9.1 and 8.9 using screen.debug() to check that the\ndrodpown was being opened, and the tests passed on all branches.","sha":"91c4e9d61bf03a887014811dedf14383600c4f4d"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228433","number":228433,"mergeCommit":{"message":"Add data-test-subj to dropdown options and adjust tests (#228433)\n\n## Summary\n\nThis test was failing in this backport PR\nhttps://github.com//pull/228343\nAfter investigating, I found that it's because the\n`findByText(elserTitle)` was finding 2 elements with that text (the\ndropdown button itself, and the dropdown option), thus failing.\nIn 9.1 and 9.2, for some reason the dropdown was not opening before that\nfindByText was executed, hence there was only 1 instance of that text,\nbut the test was not actually testing clicking the option.\n\nBy adding data-test-subj, we ensure that the dropdown is open, and that\nwe are clicking on the right option.\nThis change has already been made on the backport PR for 8.19, this PR\nadds it to 9.1 and 9.2.\n\nTested in 9.2, 9.1 and 8.9 using screen.debug() to check that the\ndrodpown was being opened, and the tests passed on all branches.","sha":"91c4e9d61bf03a887014811dedf14383600c4f4d"}}]}] BACKPORT--> Co-authored-by: Eleonora <[email protected]>
Bluefinger
pushed a commit
to Bluefinger/kibana
that referenced
this pull request
Jul 22, 2025
## Summary This test was failing in this backport PR elastic#228343 After investigating, I found that it's because the `findByText(elserTitle)` was finding 2 elements with that text (the dropdown button itself, and the dropdown option), thus failing. In 9.1 and 9.2, for some reason the dropdown was not opening before that findByText was executed, hence there was only 1 instance of that text, but the test was not actually testing clicking the option. By adding data-test-subj, we ensure that the dropdown is open, and that we are clicking on the right option. This change has already been made on the backport PR for 8.19, this PR adds it to 9.1 and 9.2. Tested in 9.2, 9.1 and 8.9 using screen.debug() to check that the drodpown was being opened, and the tests passed on all branches.
kertal
pushed a commit
to kertal/kibana
that referenced
this pull request
Jul 25, 2025
## Summary This test was failing in this backport PR elastic#228343 After investigating, I found that it's because the `findByText(elserTitle)` was finding 2 elements with that text (the dropdown button itself, and the dropdown option), thus failing. In 9.1 and 9.2, for some reason the dropdown was not opening before that findByText was executed, hence there was only 1 instance of that text, but the test was not actually testing clicking the option. By adding data-test-subj, we ensure that the dropdown is open, and that we are clicking on the right option. This change has already been made on the backport PR for 8.19, this PR adds it to 9.1 and 9.2. Tested in 9.2, 9.1 and 8.9 using screen.debug() to check that the drodpown was being opened, and the tests passed on all branches.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
main
to8.19
:Questions ?
Please refer to the Backport tool documentation