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

[Siem migrations] Implement UI polling with #201503

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

semd
Copy link
Contributor

@semd semd commented Nov 23, 2024

Summary

Sends "Rule migration complete" notifications from anywhere in the Security Solution app, whenever a rule migration finishes, with a link to the migrated rules.

The polling logic has been encapsulated in the new siemMigrations.rules service so the request loop is centralized in one place. The value updates are broadcasted using the latestStats$ observable.
It will only keep requesting while there are running migrations and will stop automatically when no more migrations are running.

The reusable useLatestStats hook has been created for the UI components to consume. This approach allows multiple components to listen and update their content automatically with every rule migration stats update, having only one request loop running.

The polling will only start if it's not already running and only if the SIEM migration functionality is available, which includes:

  • Experimental flag enabled
  • Enterprise license
  • TODO: feature capability check (RBAC issue)

The polling will try to start when:

  • Automatically with the Security Solution application starts
  • The first render of every page that uses useLatestStats hook.
  • TODO: A new migration is created from the onboarding page (issue)

Tests will be implemented in this task

Example

A Rule migration finishes while using Timeline in the Alerts page:

rule_migrations_notifications.mov

@semd semd added release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team backport:version Backport to applied version labels v8.18.0 labels Nov 23, 2024
@semd semd self-assigned this Nov 23, 2024
@semd semd requested review from a team as code owners November 23, 2024 15:38
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 23, 2024

💔 Build Failed

Failed CI Steps

History

cc @semd

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:Threat Hunting Security Solution Threat Hunting Team v8.18.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants