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 Assistant] Fix ESQL tool availability #195827

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

stephmilovic
Copy link
Contributor

@stephmilovic stephmilovic commented Oct 10, 2024

Summary

Previously, Knowledge Base needed to be installed to use the ESQL tool. The NL to ESQL tool does not require Knowledge Base, so I removed this condition.

Additionally, I found that the chain input property modelExists is equal to isEnabledKnowledgeBase. Everywhere modelExists is checked also checks isEnabledKnowledgeBase. Therefore, the condition is unnecessary and adds confusion. I removed it.

Testing

To reproduce bug on main, start a fresh es + kibana (no elser/kb installed) and ask an ESQL question. Check your LangSmith trace to find the NaturalLanguageESQLTool tool was not provided. Check out this branch and ask another ESQL question. Check your LangSmith trace once more to find the NaturalLanguageESQLTool tool was provided.

@stephmilovic stephmilovic 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 labels Oct 10, 2024
@stephmilovic stephmilovic requested review from a team as code owners October 10, 2024 20:57
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@peluja1012 peluja1012 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks, Steph!

@stephmilovic stephmilovic enabled auto-merge (squash) October 10, 2024 21:24
@stephmilovic stephmilovic merged commit 2b995fa into elastic:main Oct 10, 2024
41 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11283163997

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] test/functional/apps/discover/group6/config.ts / discover/group6 discover sidebar field filtering should show filters by type in ES|QL view

Metrics [docs]

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
elasticAssistant 38 37 -1
Unknown metric groups

API count

id before after diff
elasticAssistant 53 52 -1

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 10, 2024
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 11, 2024
)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Assistant] Fix ESQL tool availability
(#195827)](#195827)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Steph
Milovic","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-10T22:49:22Z","message":"[Security
Assistant] Fix ESQL tool availability
(#195827)","sha":"2b995fa86eb44a2bd54c44a74eb47a2a26ec0ed2","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:
SecuritySolution","Team:Security Generative
AI","v8.16.0","backport:version"],"title":"[Security Assistant] Fix ESQL
tool
availability","number":195827,"url":"https://github.com/elastic/kibana/pull/195827","mergeCommit":{"message":"[Security
Assistant] Fix ESQL tool availability
(#195827)","sha":"2b995fa86eb44a2bd54c44a74eb47a2a26ec0ed2"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195827","number":195827,"mergeCommit":{"message":"[Security
Assistant] Fix ESQL tool availability
(#195827)","sha":"2b995fa86eb44a2bd54c44a74eb47a2a26ec0ed2"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Steph Milovic <[email protected]>
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 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants