Skip to content

[9.0] [Obs AI Assistant] Add KB re-indexing when encountering semantic_text bug (#210386)#211504

Closed
sorenlouv wants to merge 1 commit intoelastic:9.0from
sorenlouv:backport/9.0/pr-210386
Closed

[9.0] [Obs AI Assistant] Add KB re-indexing when encountering semantic_text bug (#210386)#211504
sorenlouv wants to merge 1 commit intoelastic:9.0from
sorenlouv:backport/9.0/pr-210386

Conversation

@sorenlouv
Copy link
Copy Markdown
Member

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

…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)
@sorenlouv sorenlouv added the backport This PR is a backport of another PR label Feb 17, 2025
@sorenlouv sorenlouv enabled auto-merge (squash) February 17, 2025 19:00
@botelastic botelastic bot added the Team:Obs AI Assistant Observability AI Assistant label Feb 17, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

@sorenlouv
Copy link
Copy Markdown
Member Author

Replaced by #211509

@sorenlouv sorenlouv closed this Feb 17, 2025
auto-merge was automatically disabled February 17, 2025 21:09

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:Obs AI Assistant Observability AI Assistant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants