[9.0] [Obs AI Assistant] Add KB re-indexing when encountering semantic_text bug (#210386)#211509
Merged
kibanamachine merged 1 commit intoelastic:9.0from Feb 17, 2025
Merged
Conversation
…t` bug (elastic#210386) Closes elastic#210204 This will automatically re-index the knowledge base if upon adding a KB entry there is this error: > The [sparse_vector] field type is not supported on indices created on versions 8.0 to 8.10 That error means that semantic_text is not supported in the given index, and it should therefore be re-indexed. **How to test this PR:** **8.10** - `git checkout -B 8.10 origin/8.10` - Start Kibana: - `nvm use && yarn kbn bootstrap && yarn start` - Start ES - `nvm use && yarn es snapshot --license trial --E path.data="/Users/sorenlouv/elastic/kbn_es_data/upgrade_testing"` **8.19** - `git checkout -B 8.19 origin/8.x` - Start Kibana: - `nvm use && yarn kbn bootstrap && yarn start` - Start ES - `nvm use && yarn es snapshot --license trial --E path.data="/Users/sorenlouv/elastic/kbn_es_data/upgrade_testing"` - Install Knowledge base - Try adding an item to KB (it should fail ❌️) **9.1.0** - `gh pr checkout 210386` - Start Kibana: - `nvm use && yarn kbn bootstrap && yarn start` - Start ES - `nvm use && yarn es snapshot --license trial --E path.data="/Users/sorenlouv/elastic/kbn_es_data/upgrade_testing"` - Try adding an item to KB (it should succeed ✅️) **TODO:** - Add an upgrade test that covers this flow --------- Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com> (cherry picked from commit df67a09)
Contributor
|
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
Contributor
💚 Build Succeeded
Metrics [docs]
cc @sorenlouv |
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
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
mainto9.0:semantic_textbug (#210386)Questions ?
Please refer to the Backport tool documentation
\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Søren Louv-Jansen "}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com//pull/210386","number":210386,"mergeCommit":{"message":"[Obs AI Assistant] Add KB re-indexing when encountering `semantic_text` bug (#210386)\n\nCloses https://github.com//issues/210204\n\nThis will automatically re-index the knowledge base if upon adding a KB\nentry there is this error:\n\n> The [sparse_vector] field type is not supported on indices created on\nversions 8.0 to 8.10\n\nThat error means that semantic_text is not supported in the given index,\nand it should therefore be re-indexed.\n\n**How to test this PR:**\n\n**8.10**\n- `git checkout -B 8.10 origin/8.10`\n- Start Kibana:\n - `nvm use && yarn kbn bootstrap && yarn start`\n- Start ES\n- `nvm use && yarn es snapshot --license trial --E\npath.data=\"/Users/sorenlouv/elastic/kbn_es_data/upgrade_testing\"`\n\n**8.19**\n- `git checkout -B 8.19 origin/8.x`\n- Start Kibana:\n - `nvm use && yarn kbn bootstrap && yarn start`\n- Start ES\n- `nvm use && yarn es snapshot --license trial --E\npath.data=\"/Users/sorenlouv/elastic/kbn_es_data/upgrade_testing\"`\n- Install Knowledge base\n- Try adding an item to KB (it should fail ❌️)\n\n**9.1.0**\n- `gh pr checkout 210386`\n- Start Kibana:\n - `nvm use && yarn kbn bootstrap && yarn start`\n- Start ES\n- `nvm use && yarn es snapshot --license trial --E\npath.data=\"/Users/sorenlouv/elastic/kbn_es_data/upgrade_testing\"`\n- Try adding an item to KB (it should succeed ✅️)\n\n**TODO:**\n\n- Add an upgrade test that covers this flow\n\n---------\n\nCo-authored-by: Viduni Wickramarachchi ","sha":"df67a09afab22521dfa9ff3ec3a4f624a039c462"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"url":"https://github.com//pull/211498","number":211498,"state":"MERGED","mergeCommit":{"sha":"ddd2ccd0a4246d5e4f2bc73f6e9716ee666025e2","message":"[8.x] [Obs AI Assistant] Add KB re-indexing when encountering `semantic_text` bug (#210386) (#211498)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.x`:\n- [[Obs AI Assistant] Add KB re-indexing when encountering\n`semantic_text` bug\n(#210386)](https://github.com//pull/210386)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Søren Louv-Jansen "}}]}] BACKPORT-->