Skip to content
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

[8.11] [Security Solution] [Elastic AI Assistant] Throw error if Knowledge Base is enabled but ELSER is unavailable (#169330) #169455

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

spong
Copy link
Member

@spong spong commented Oct 19, 2023

Backport

This will backport the following commits from main to 8.11:

Questions ?

Please refer to the Backport tool documentation

…ase is enabled but ELSER is unavailable (elastic#169330)

## Summary

This fixes the Knowledge Base UX a bit by throwing an error if somehow
ELSER has been disabled in the background, and instructs the user on how
to resolve or to disable the Knowledge Base to continue.

Additionally, if ELSER is not available, we prevent the enabling of the
Knowledge Base as to not provide a degraded experience when ELSER and
the ES|QL documentation is not available.

<p align="center">
<img width="500"
src="https://github.com/elastic/kibana/assets/2946766/e4d326fa-c996-43ad-9d1c-d76f7d16f916"
/>
</p>

> [!NOTE]
> `isModelInstalled` logic has been updated to not just check the model
`definition_status`, but to actually ensure that it's deployed by
checking to see that it is `started` and `fully_allocated`. This better
guards ELSER availability as the previous check would return true if the
model was just downloaded and not actually deployed.

Also resolves: elastic#169403

## Test Instructions

After enabling the KB, disable the ELSER deployment in the `Trained
Models` ML UI and then try using the assistant.

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 60bb1f8)

# Conflicts:
#	x-pack/packages/kbn-elastic-assistant/impl/knowledge_base/knowledge_base_settings/knowledge_base_settings.tsx
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 13.0MB 13.0MB +3.5KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@spong spong merged commit 97c65a5 into elastic:8.11 Oct 19, 2023
1 check passed
@spong spong deleted the backport/8.11/pr-169330 branch October 19, 2023 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants