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

[Security Solution][Bug] On switching Knowledge Base Index Sharing from Private to Global shows Error updating Knowledge Base Entries (#198891) #199059

Closed

Conversation

e40pud
Copy link
Contributor

@e40pud e40pud commented Nov 5, 2024

Summary

BUG: #198891

These changes fix the issue with the ES bulk update operation and semantic_text type fields. ES bulk update operation require such fields to be specified even when those are not required in mappings.

The ES returns an error Field [semantic_text] must be specified on an update request to calculate inference for field [semantic_text] in this case.

We do not use sematic_text field for index entries in knowledge base and that is why those entries have this field undefined. To avoid an error we pass a dummy text to satisfy ES.

To test

  1. Create an index entry
  2. Edit the entry from 1
  3. Update the entry (for example change the name)
  4. Save entry

…om Private to Global shows Error updating Knowledge Base Entries (elastic#198891)
@e40pud e40pud added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Security Generative AI Security Generative AI v8.16.0 backport:version Backport to applied version labels v8.17.0 labels Nov 5, 2024
@e40pud e40pud self-assigned this Nov 5, 2024
@e40pud e40pud requested a review from a team as a code owner November 5, 2024 21:54
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that the fix now allows index entry updates. Used the assistant to invoke an updated index entry to confirm that the addition of the mock semantic_text value does not break the custom knowledge base tools. LGTM!!

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts / alerting api integration security and spaces enabled Alerts - Group 1 alerts backfill rule runs backfill api key invalidation should wait to invalidate API key until backfill for rule is complete

Metrics [docs]

✅ unchanged

cc @e40pud

@e40pud
Copy link
Contributor Author

e40pud commented Nov 18, 2024

Fixed in elastic/elasticsearch#116478

@e40pud e40pud closed this Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants