[8.18] [Obs AI Assistant] Check for documents before starting semantic text migration (#221152)#223827
Closed
viduni94 wants to merge 1 commit intoelastic:8.18from
Closed
[8.18] [Obs AI Assistant] Check for documents before starting semantic text migration (#221152)#223827viduni94 wants to merge 1 commit intoelastic:8.18from
viduni94 wants to merge 1 commit intoelastic:8.18from
Conversation
…migration (elastic#221152) Closes elastic#221157 ## Summary We run a semantic text migration at startup to add the semantic text field to documents that were created before 8.17. Before multilingual KB was introduced: - We created index assets for KB when the AI Assistant flyout opens. - Even if the user does not set up the KB, they will have a component template pointing to the custom inference endpoint. With the introduction of multilingual KB: - We moved some of the index creation to when setting up the KB. - We try to do the semantic_text migration at startup. During this migration, for users who didn't set up the KB but had the index assets created at startup, the custom inference endpoint will be unavailable. - But since the migration uses the inference endpoint from the write index, we try to access an endpoint that's not available. This is the reason for this error to be logged. ``` Inference endpoint "obs_ai_assistant_kb_inference" not found or unavailable: resource_not_found_exception Root causes: resource_not_found_exception: Inference endpoint not found [obs_ai_assistant_kb_inference] ``` There is no customer impact from this, just that the error that gets logged is creating a lot of noise. ## Solution This PR checks whether there are documents without semantic_text before starting the migration. And also reduced the log level to warn because we hit the `/status` endpoint once when a user opens the AI Assistant. ### Checklist - [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) (cherry picked from commit b1e7012) # Conflicts: # x-pack/platform/plugins/shared/observability_ai_assistant/server/service/inference_endpoint.ts # x-pack/platform/plugins/shared/observability_ai_assistant/server/service/startup_migrations/populate_missing_semantic_text_fields.ts
1 task
Contributor
|
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
Contributor
Author
|
/ci |
Contributor
💔 Build Failed
Failed CI StepsMetrics [docs]
History
|
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
mainto8.18:Questions ?
Please refer to the Backport tool documentation