-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] [Elastic AI Assistant] Fixes Knowledge Base not l…
…oading in cloud environments (#169039) ## Summary Resolves an issue on cloud deployments where the Knowledge Base could be set up, but the ES|QL entries would not be loaded. Renames `knowledge_base/esql/docs` to `knowledge_base/esql/documentation`, as `docs` is part of the Kibana build [time exclusion strategy](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/copy_legacy_source_task.ts#L41). Note, even though line `39` excludes `asciidoc`, in testing it was actually the `docs` entry from line `41` that was preventing them from being included in the Kibana build process. Note: Actual changeset here is just a couple files, updating the `esql_loader` and corresponding tests. Majority of changes are from the rename, so should be a straight-forward review. To test that the assets are included in the build, you can run a `yarn build` locally and verify the assets are included in the dist at: `build/kibana/node_modules/@kbn/elastic-assistant-plugin/server/knowledge_base/esql/documentation`), or alternatively, just log into this PR's `ci:cloud-deploy` instance from the Kibana build details, and verify that the appropriate errors (ELSER n/a, not file missing) are logged when trying to load the `ES|QL Knowledge Base Documents`. > [!NOTE] > Since the `ci:cloud-deploy` instances don't deploy with an ML node of sufficient capacity, you can't actually deploy ELSER, but you can download it, which is all that the initial ELSER check ensures, so you can still test that the docs have attempted to be loaded into the `.kibana-elastic-ai-assistant-kb` index by checking the [cluster's kibana logs](https://kibana-pr-169039.kb.us-west2.gcp.elastic-cloud.com:9243/app/logs/stream?logFilter=(filters:!(),query:(language:kuery,query:'service.id:%2258121ceb066505e00f0913733b3e5ee9%22%20and%20%22language%20docs%22'),refreshInterval:(pause:!t,value:5000),timeRange:(from:now-15m,to:now))&logView=(logViewId:default,type:log-view-reference)&flyoutOptions=(flyoutId:'3L_7PosBZTjGpbeGx6t3',flyoutVisibility:hidden,surroundingLogsId:!n)&logPosition=(position:(tiebreaker:2852,time:1697599602455))), and verifying the below log line: > > `[kibana.log][INFO] Loaded 0 ES|QL docs, language docs, and example queries into the Knowledge Base` > > with logs above it detailing the docs to be loaded, and them failing because ELSER is MIA. --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
d6f7384
commit 716b1d3
Showing
134 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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