Commit bac6d90
[8.18] [Obs AI Assistant] Add KB re-indexing when encountering
# Backport
This will backport the following commits from `main` to `8.18`:
- [[Obs AI Assistant] Add KB re-indexing when encountering
`semantic_text` bug
(elastic#210386)](elastic#210386)
<!--- Backport version: 9.6.5 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Søren
Louv-Jansen","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-17T17:20:50Z","message":"[Obs
AI Assistant] Add KB re-indexing when encountering `semantic_text` bug
(elastic#210386)\n\nCloses
https://github.com/elastic/kibana/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
<[email protected]>","sha":"df67a09afab22521dfa9ff3ec3a4f624a039c462","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:prev-major","Team:Obs
AI Assistant","v9.1.0"],"title":"[Obs AI Assistant] Add KB re-indexing
when encountering `semantic_text`
bug","number":210386,"url":"https://github.com/elastic/kibana/pull/210386","mergeCommit":{"message":"[Obs
AI Assistant] Add KB re-indexing when encountering `semantic_text` bug
(elastic#210386)\n\nCloses
https://github.com/elastic/kibana/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
<[email protected]>","sha":"df67a09afab22521dfa9ff3ec3a4f624a039c462"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210386","number":210386,"mergeCommit":{"message":"[Obs
AI Assistant] Add KB re-indexing when encountering `semantic_text` bug
(elastic#210386)\n\nCloses
https://github.com/elastic/kibana/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
<[email protected]>","sha":"df67a09afab22521dfa9ff3ec3a4f624a039c462"}}]}]
BACKPORT-->
Co-authored-by: Søren Louv-Jansen <[email protected]>semantic_text bug (elastic#210386) (elastic#211497)1 parent b408e8c commit bac6d90
File tree
19 files changed
+667
-228
lines changed- x-pack
- test/api_integration
- deployment_agnostic
- apis/observability/ai_assistant
- knowledge_base
- default_configs
19 files changed
+667
-228
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
127 | 134 | | |
128 | 135 | | |
129 | | - | |
| 136 | + | |
130 | 137 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
134 | 143 | | |
135 | 144 | | |
136 | 145 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
695 | 694 | | |
696 | | - | |
| 695 | + | |
697 | 696 | | |
698 | 697 | | |
699 | 698 | | |
| |||
704 | 703 | | |
705 | 704 | | |
706 | 705 | | |
707 | | - | |
708 | | - | |
| 706 | + | |
| 707 | + | |
709 | 708 | | |
710 | 709 | | |
711 | 710 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
16 | 42 | | |
17 | 43 | | |
18 | 44 | | |
| |||
56 | 82 | | |
57 | 83 | | |
58 | 84 | | |
59 | | - | |
| 85 | + | |
60 | 86 | | |
61 | 87 | | |
62 | 88 | | |
| |||
86 | 112 | | |
87 | 113 | | |
88 | 114 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 115 | + | |
103 | 116 | | |
104 | 117 | | |
105 | 118 | | |
106 | 119 | | |
107 | 120 | | |
108 | 121 | | |
109 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
47 | | - | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
Lines changed: 38 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
406 | 411 | | |
407 | 412 | | |
408 | 413 | | |
409 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
410 | 417 | | |
411 | 418 | | |
412 | 419 | | |
| |||
418 | 425 | | |
419 | 426 | | |
420 | 427 | | |
| 428 | + | |
421 | 429 | | |
| 430 | + | |
422 | 431 | | |
423 | 432 | | |
424 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
425 | 462 | | |
426 | 463 | | |
427 | 464 | | |
| |||
0 commit comments