Skip to content

[8.19] [Obs AI Assistant] Minor cleanup api tests (#215181) | [Obs AI Assistant] Replace Task Manager usage with Lock Manager (#216916) | update knowledge base installation flow (#214133) | [Obs AI Assistant] Specify embedding model during onboarding for the Knowledge Base (#218448)#220041

Merged
sorenlouv merged 10 commits intoelastic:8.19from
sorenlouv:backport/8.19/pr-215181_pr-216916_pr-214133_pr-218448
May 5, 2025

Conversation

sorenlouv and others added 4 commits May 5, 2025 11:06
- Remove duplicated helpers
- improve log messages
- Clear intercepted requests after every test

---------

Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
(cherry picked from commit b9cd2c8)
…tic#216916)

This PR replaces usage of the Kibana Task Manager with the [LockManager
utility](elastic#216397) that ensures
strict mutual exclusion when running operations such as re-indexing or
data migrations.

---------

Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 6244105)
## Summary
Closes [elastic#209791](elastic#209791)
Closes [elastic#204378](elastic#204378)
### Improve Knowledge Base Installation and Inference Endpoint
Management

#### Enhancements
- The **"Install Knowledge Base"** button is only shown when there is no
inference endpoint. If the inference endpoint creation fails, an error
notification is displayed.
- When an inference endpoint **exists and is ready**, no buttons or
messages are shown.
- If the installation was in progress and **succeeded**, a success
message is displayed.
- If an inference endpoint is present, users can **inspect the state of
the model deployment** to diagnose issues.
- When an inference endpoint exists but has an **error**, users can
retry the installation.

#### Inspection & Troubleshooting
Users can inspect the inference endpoint's deployment status, including:
- **Model is deploying**
- **No ML node available**
- **Insufficient memory available**

https://github.com/user-attachments/assets/03a91120-173c-4dc9-b6f2-59a8c8c8defb

### Suggested Improvements
- Display **autoscaling information** for better resource insights.
- Show **ML node details** to help users understand the infrastructure.
- Allow users to **install, deploy, and stop the model** directly from
the inspection popup.

These changes enhance visibility, troubleshooting, and control over
inference endpoint deployment. 🚀

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

(cherry picked from commit 4109420)
…Knowledge Base (elastic#218448)

Closes elastic/obs-ai-team#230
Closes elastic/obs-ai-team#232

Related to elastic#215591

## Summary

This PR implements the changes related to the first phase of supporing
multilingual Knowledge Base. The users have the ability to pick the
`e5-small` model for the Knowledge Base, if they want support for
languages other than English.

<img width="610" alt="image"
src="https://github.com/user-attachments/assets/4c815aa4-aa97-4845-98c5-e079dd92f23a"
/>

<img width="1281" alt="image"
src="https://github.com/user-attachments/assets/7c1bcd82-5464-497f-a053-7fe271da1cdd"
/>

<img width="1280" alt="image"
src="https://github.com/user-attachments/assets/bc084e90-c291-44ea-8560-e033729bfcca"
/>

When the KB model is not allocated due to nodes scaling down:

![image](https://github.com/user-attachments/assets/2f52e31e-81e4-4824-bc5b-b97df714da5c)

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [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)

## Upgrade testing steps

### 9.0 - 9.1 (main)

Checkout `9.0` branch and start Kibana and ES. ES must be started with
`path.data` to persist data:

```
yarn es snapshot --license trial --E path.data=/Users/sorenlouv/elastic/es_data/upgrade_test_9.0
```

---------

Co-authored-by: Søren Louv-Jansen <soren.louv@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
(cherry picked from commit dc019f8)

# Conflicts:
#	x-pack/platform/plugins/private/translations/translations/fr-FR.json
#	x-pack/platform/plugins/private/translations/translations/ja-JP.json
#	x-pack/platform/plugins/private/translations/translations/zh-CN.json
#	x-pack/platform/plugins/shared/observability_ai_assistant/server/service/inference_endpoint.ts
#	x-pack/platform/plugins/shared/observability_ai_assistant/server/service/knowledge_base_service/reindex_knowledge_base.ts
#	x-pack/platform/plugins/shared/observability_ai_assistant/server/service/startup_migrations/create_or_update_index_assets.ts
#	x-pack/platform/plugins/shared/observability_ai_assistant/server/service/startup_migrations/populate_missing_semantic_text_field_migration.ts
#	x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.json
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/chat/chat.spec.ts
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base.spec.ts
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_reindex_and_populate_missing_semantic_text_fields.spec.ts
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_reindex_to_fix_sparse_vector_support.spec.ts
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_setup.spec.ts
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_status.spec.ts
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/utils/knowledge_base.ts
@elasticmachine
Copy link
Contributor

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

@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2025

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

elasticmachine commented May 5, 2025

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observabilityAIAssistantApp 425 434 +9
observabilityAiAssistantManagement 384 393 +9
searchAssistant 266 275 +9
total +27

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/ai-assistant 105 109 +4
@kbn/lock-manager 11 13 +2
observabilityAIAssistant 390 395 +5
total +11

Async chunks

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

id before after diff
observabilityAIAssistantApp 244.7KB 256.3KB +11.6KB
observabilityAiAssistantManagement 86.8KB 96.5KB +9.7KB
searchAssistant 160.8KB 172.3KB +11.6KB
total +32.9KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/lock-manager 0 1 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
observabilityAIAssistant 38.4KB 38.7KB +285.0B
observabilityAiAssistantManagement 5.8KB 5.9KB +61.0B
searchAssistant 5.5KB 5.5KB -1.0B
total +345.0B
Unknown metric groups

API count

id before after diff
@kbn/ai-assistant 105 109 +4
@kbn/lock-manager 12 14 +2
observabilityAIAssistant 392 397 +5
total +11

History

@sorenlouv sorenlouv merged commit 78061cd into elastic:8.19 May 5, 2025
9 checks passed
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 ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants