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 AI Assistant] Fixed assistant availability check in the overlay #183585

Merged

Conversation

YulNaumenko
Copy link
Contributor

@YulNaumenko YulNaumenko commented May 16, 2024

This PR adding the check for the assistant license.

The initial bug before fix:

errrrec.mov

after:
no error dialog pop up

@YulNaumenko YulNaumenko requested review from a team as code owners May 16, 2024 05:14
@YulNaumenko YulNaumenko requested a review from dplumlee May 16, 2024 05:14
@YulNaumenko YulNaumenko self-assigned this May 16, 2024
@YulNaumenko YulNaumenko added v8.14.0 release_note:skip Skip the PR/issue when compiling release notes v8.15.0 bug Fixes for quality problems that affect the customer experience labels May 16, 2024
@YulNaumenko YulNaumenko requested a review from a team as a code owner May 16, 2024 20:58
Copy link
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

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

desk tested and code LGTM for the Threat Hunting Investigations team

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.

tested and it works as expected. thanks for the fix!

@YulNaumenko YulNaumenko enabled auto-merge (squash) May 16, 2024 22:21
@spong
Copy link
Member

spong commented May 16, 2024

Looks like the NewChat entry point for the Data Quality Dashboard needs updated as well:

Copy link
Member

@spong spong left a comment

Choose a reason for hiding this comment

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

Checked out, tested locally, and code reviewed -- LGTM! Thanks for the speedy fix here @YulNaumenko! 🙏

@maximpn maximpn self-requested a review May 17, 2024 06:42
Copy link
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

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

Rule Management Area LGTM

@maximpn maximpn removed the request for review from dplumlee May 17, 2024 06:44
@@ -105,6 +105,7 @@ export const RulesTableToolbar = React.memo(() => {
getPromptContext={getPromptContext}
suggestedUserPrompt={i18nAssistant.EXPLAIN_THEN_SUMMARIZE_RULE_DETAILS}
tooltip={i18nAssistant.RULE_MANAGEMENT_CONTEXT_TOOLTIP}
isAssistantEnabled={isAssistantEnabled}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we call const { hasAssistantPrivilege, isAssistantEnabled } = useAssistantAvailability(); inside the NewChat component? Why our code needs to be changed every time some internal logic of the Assistant changes?

@YulNaumenko YulNaumenko merged commit e24502d into elastic:main May 17, 2024
36 checks passed
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

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
@kbn/elastic-assistant 146 147 +1

Async chunks

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

id before after diff
securitySolution 15.1MB 15.1MB +149.0B
Unknown metric groups

API count

id before after diff
@kbn/elastic-assistant 173 174 +1

History

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

cc @YulNaumenko

@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label May 17, 2024
@YulNaumenko YulNaumenko added v8.14.0 backport:skip This commit does not require backporting and removed backport:skip This commit does not require backporting v8.14.0 labels May 17, 2024
@spong
Copy link
Member

spong commented May 17, 2024

💚 All backports created successfully

Status Branch Result
8.14

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

Questions ?

Please refer to the Backport tool documentation

spong pushed a commit to spong/kibana that referenced this pull request May 17, 2024
…rlay (elastic#183585)

This PR adding the check for the assistant license.

The initial bug before fix:

https://github.com/elastic/kibana/assets/55110838/1afcb112-714a-43e1-8f0d-58fb5b37fc4a

after:
no error dialog pop up

(cherry picked from commit e24502d)
spong added a commit that referenced this pull request May 17, 2024
…the overlay (#183585) (#183784)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[Security AI Assistant] Fixed assistant availability check in the
overlay (#183585)](#183585)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Yuliia
Naumenko","email":"jo.naumenko@gmail.com"},"sourceCommit":{"committedDate":"2024-05-17T18:00:46Z","message":"[Security
AI Assistant] Fixed assistant availability check in the overlay
(#183585)\n\nThis PR adding the check for the assistant
license.\r\n\r\nThe initial bug before
fix:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/55110838/1afcb112-714a-43e1-8f0d-58fb5b37fc4a\r\n\r\nafter:\r\nno
error dialog pop
up","sha":"e24502d70ab98e738552ec46e69707d83152cf44","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","backport:skip","v8.15.0"],"number":183585,"url":"https://github.com/elastic/kibana/pull/183585","mergeCommit":{"message":"[Security
AI Assistant] Fixed assistant availability check in the overlay
(#183585)\n\nThis PR adding the check for the assistant
license.\r\n\r\nThe initial bug before
fix:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/55110838/1afcb112-714a-43e1-8f0d-58fb5b37fc4a\r\n\r\nafter:\r\nno
error dialog pop
up","sha":"e24502d70ab98e738552ec46e69707d83152cf44"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/183585","number":183585,"mergeCommit":{"message":"[Security
AI Assistant] Fixed assistant availability check in the overlay
(#183585)\n\nThis PR adding the check for the assistant
license.\r\n\r\nThe initial bug before
fix:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/55110838/1afcb112-714a-43e1-8f0d-58fb5b37fc4a\r\n\r\nafter:\r\nno
error dialog pop
up","sha":"e24502d70ab98e738552ec46e69707d83152cf44"}}]}] BACKPORT-->

Co-authored-by: Yuliia Naumenko <jo.naumenko@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes v8.14.0 v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants