Skip to content

[Attack discovery] Show error toasts when useFindAttackDiscoveries and useGetAttackDiscoveryGenerations fail#225940

Merged
andrew-goldstein merged 4 commits intoelastic:mainfrom
andrew-goldstein:attack_discovery_get_error_toasts
Jul 2, 2025
Merged

[Attack discovery] Show error toasts when useFindAttackDiscoveries and useGetAttackDiscoveryGenerations fail#225940
andrew-goldstein merged 4 commits intoelastic:mainfrom
andrew-goldstein:attack_discovery_get_error_toasts

Conversation

@andrew-goldstein
Copy link
Contributor

@andrew-goldstein andrew-goldstein commented Jul 1, 2025

[Attack discovery] Show error toasts when useFindAttackDiscoveries and useGetAttackDiscoveryGenerations fail

This PR fixes an issue where the Attack discovery page should display error toasts when the useFindAttackDiscoveries and useGetAttackDiscoveryGenerations hooks fail to retrieve results.

The error toasts are illustrated by the screenshots below:

find_attack_discoveries_error

Above: An error toaster is displayed when useFindAttackDiscoveries fails

get_attack_discovery_generations_error

Above: An error toaster is displayed when useGetAttackDiscoveryGenerations fails

Feature flags

The following securitySolution.attackDiscoveryAlertsEnabled feature flag in config/kibana.dev.yml is required to view the error toasters:

feature_flags.overrides:
  securitySolution.attackDiscoveryAlertsEnabled: true

@andrew-goldstein andrew-goldstein self-assigned this Jul 1, 2025
@andrew-goldstein andrew-goldstein added release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Jul 1, 2025
@andrew-goldstein andrew-goldstein requested a review from a team as a code owner July 1, 2025 05:49
@andrew-goldstein andrew-goldstein added Team:Security Generative AI Security Generative AI backport:version Backport to applied version labels v9.1.0 v8.19.0 v9.2.0 labels Jul 1, 2025
@elasticmachine
Copy link
Contributor

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

@e40pud e40pud self-requested a review July 1, 2025 07:57
Copy link
Contributor

@e40pud e40pud left a comment

Choose a reason for hiding this comment

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

Thank you for the fix! Tested locally - everything works. LGTM

@andrew-goldstein andrew-goldstein force-pushed the attack_discovery_get_error_toasts branch from c759390 to c0a31e3 Compare July 1, 2025 12:41
…s` and `useGetAttackDiscoveryGenerations` fail

This PR fixes an issue where the Attack discovery page should display error toasts when  the `useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` hooks fail to retrieve results.

The error toasts are illustrated by the screenshots below:

![find_attack_discoveries_error](https://github.com/user-attachments/assets/c9af708e-d0bc-4d1b-bf16-a0af43456dc2)

_Above: An error toaster is displayed when `useFindAttackDiscoveries` fails_

![get_attack_discovery_generations_error](https://github.com/user-attachments/assets/5694ee39-562d-4a37-ab43-b16fd03040a2)

_Above: An error toaster is displayed when `useGetAttackDiscoveryGenerations` fails_

### Feature flags

The following `securitySolution.attackDiscoveryAlertsEnabled` feature flag in `config/kibana.dev.yml` is required to view the error toasters:

```yaml
feature_flags.overrides:
  securitySolution.attackDiscoveryAlertsEnabled: true
```
@andrew-goldstein andrew-goldstein force-pushed the attack_discovery_get_error_toasts branch from 7b8dfcc to 14ed128 Compare July 1, 2025 20:21
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 7785 7787 +2

Async chunks

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

id before after diff
securitySolution 9.8MB 9.8MB +617.0B

History

cc @andrew-goldstein

@andrew-goldstein andrew-goldstein merged commit db33a3f into elastic:main Jul 2, 2025
10 checks passed
@andrew-goldstein andrew-goldstein deleted the attack_discovery_get_error_toasts branch July 2, 2025 19:57
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 2, 2025
…d useGetAttackDiscoveryGenerations fail (elastic#225940)

## [Attack discovery] Show error toasts when `useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` fail

This PR fixes an issue where the Attack discovery page should display error toasts when  the `useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` hooks fail to retrieve results.

The error toasts are illustrated by the screenshots below:

![find_attack_discoveries_error](https://github.com/user-attachments/assets/c9af708e-d0bc-4d1b-bf16-a0af43456dc2)

_Above: An error toaster is displayed when `useFindAttackDiscoveries` fails_

![get_attack_discovery_generations_error](https://github.com/user-attachments/assets/5694ee39-562d-4a37-ab43-b16fd03040a2)

_Above: An error toaster is displayed when `useGetAttackDiscoveryGenerations` fails_

### Feature flags

The following `securitySolution.attackDiscoveryAlertsEnabled` feature flag in `config/kibana.dev.yml` is required to view the error toasters:

```yaml
feature_flags.overrides:
  securitySolution.attackDiscoveryAlertsEnabled: true
```

(cherry picked from commit db33a3f)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 2, 2025
…d useGetAttackDiscoveryGenerations fail (elastic#225940)

## [Attack discovery] Show error toasts when `useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` fail

This PR fixes an issue where the Attack discovery page should display error toasts when  the `useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` hooks fail to retrieve results.

The error toasts are illustrated by the screenshots below:

![find_attack_discoveries_error](https://github.com/user-attachments/assets/c9af708e-d0bc-4d1b-bf16-a0af43456dc2)

_Above: An error toaster is displayed when `useFindAttackDiscoveries` fails_

![get_attack_discovery_generations_error](https://github.com/user-attachments/assets/5694ee39-562d-4a37-ab43-b16fd03040a2)

_Above: An error toaster is displayed when `useGetAttackDiscoveryGenerations` fails_

### Feature flags

The following `securitySolution.attackDiscoveryAlertsEnabled` feature flag in `config/kibana.dev.yml` is required to view the error toasters:

```yaml
feature_flags.overrides:
  securitySolution.attackDiscoveryAlertsEnabled: true
```

(cherry picked from commit db33a3f)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1

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 Jul 2, 2025
…ies and useGetAttackDiscoveryGenerations fail (#225940) (#226302)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Attack discovery] Show error toasts when useFindAttackDiscoveries
and useGetAttackDiscoveryGenerations fail
(#225940)](#225940)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Andrew
Macri","email":"andrew.macri@elastic.co"},"sourceCommit":{"committedDate":"2025-07-02T19:57:02Z","message":"[Attack
discovery] Show error toasts when useFindAttackDiscoveries and
useGetAttackDiscoveryGenerations fail (#225940)\n\n## [Attack discovery]
Show error toasts when `useFindAttackDiscoveries` and
`useGetAttackDiscoveryGenerations` fail\n\nThis PR fixes an issue where
the Attack discovery page should display error toasts when the
`useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` hooks
fail to retrieve results.\n\nThe error toasts are illustrated by the
screenshots
below:\n\n![find_attack_discoveries_error](https://github.com/user-attachments/assets/c9af708e-d0bc-4d1b-bf16-a0af43456dc2)\n\n_Above:
An error toaster is displayed when `useFindAttackDiscoveries`
fails_\n\n![get_attack_discovery_generations_error](https://github.com/user-attachments/assets/5694ee39-562d-4a37-ab43-b16fd03040a2)\n\n_Above:
An error toaster is displayed when `useGetAttackDiscoveryGenerations`
fails_\n\n### Feature flags\n\nThe following
`securitySolution.attackDiscoveryAlertsEnabled` feature flag in
`config/kibana.dev.yml` is required to view the error
toasters:\n\n```yaml\nfeature_flags.overrides:\n
securitySolution.attackDiscoveryAlertsEnabled:
true\n```","sha":"db33a3faadb6cd2e08e7faf05581d7e69542996e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
SecuritySolution","Team:Security Generative
AI","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Attack
discovery] Show error toasts when useFindAttackDiscoveries and
useGetAttackDiscoveryGenerations
fail","number":225940,"url":"https://github.com/elastic/kibana/pull/225940","mergeCommit":{"message":"[Attack
discovery] Show error toasts when useFindAttackDiscoveries and
useGetAttackDiscoveryGenerations fail (#225940)\n\n## [Attack discovery]
Show error toasts when `useFindAttackDiscoveries` and
`useGetAttackDiscoveryGenerations` fail\n\nThis PR fixes an issue where
the Attack discovery page should display error toasts when the
`useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` hooks
fail to retrieve results.\n\nThe error toasts are illustrated by the
screenshots
below:\n\n![find_attack_discoveries_error](https://github.com/user-attachments/assets/c9af708e-d0bc-4d1b-bf16-a0af43456dc2)\n\n_Above:
An error toaster is displayed when `useFindAttackDiscoveries`
fails_\n\n![get_attack_discovery_generations_error](https://github.com/user-attachments/assets/5694ee39-562d-4a37-ab43-b16fd03040a2)\n\n_Above:
An error toaster is displayed when `useGetAttackDiscoveryGenerations`
fails_\n\n### Feature flags\n\nThe following
`securitySolution.attackDiscoveryAlertsEnabled` feature flag in
`config/kibana.dev.yml` is required to view the error
toasters:\n\n```yaml\nfeature_flags.overrides:\n
securitySolution.attackDiscoveryAlertsEnabled:
true\n```","sha":"db33a3faadb6cd2e08e7faf05581d7e69542996e"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225940","number":225940,"mergeCommit":{"message":"[Attack
discovery] Show error toasts when useFindAttackDiscoveries and
useGetAttackDiscoveryGenerations fail (#225940)\n\n## [Attack discovery]
Show error toasts when `useFindAttackDiscoveries` and
`useGetAttackDiscoveryGenerations` fail\n\nThis PR fixes an issue where
the Attack discovery page should display error toasts when the
`useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` hooks
fail to retrieve results.\n\nThe error toasts are illustrated by the
screenshots
below:\n\n![find_attack_discoveries_error](https://github.com/user-attachments/assets/c9af708e-d0bc-4d1b-bf16-a0af43456dc2)\n\n_Above:
An error toaster is displayed when `useFindAttackDiscoveries`
fails_\n\n![get_attack_discovery_generations_error](https://github.com/user-attachments/assets/5694ee39-562d-4a37-ab43-b16fd03040a2)\n\n_Above:
An error toaster is displayed when `useGetAttackDiscoveryGenerations`
fails_\n\n### Feature flags\n\nThe following
`securitySolution.attackDiscoveryAlertsEnabled` feature flag in
`config/kibana.dev.yml` is required to view the error
toasters:\n\n```yaml\nfeature_flags.overrides:\n
securitySolution.attackDiscoveryAlertsEnabled:
true\n```","sha":"db33a3faadb6cd2e08e7faf05581d7e69542996e"}}]}]
BACKPORT-->

Co-authored-by: Andrew Macri <andrew.macri@elastic.co>
kibanamachine added a commit that referenced this pull request Jul 2, 2025
…ries and useGetAttackDiscoveryGenerations fail (#225940) (#226301)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Attack discovery] Show error toasts when useFindAttackDiscoveries
and useGetAttackDiscoveryGenerations fail
(#225940)](#225940)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Andrew
Macri","email":"andrew.macri@elastic.co"},"sourceCommit":{"committedDate":"2025-07-02T19:57:02Z","message":"[Attack
discovery] Show error toasts when useFindAttackDiscoveries and
useGetAttackDiscoveryGenerations fail (#225940)\n\n## [Attack discovery]
Show error toasts when `useFindAttackDiscoveries` and
`useGetAttackDiscoveryGenerations` fail\n\nThis PR fixes an issue where
the Attack discovery page should display error toasts when the
`useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` hooks
fail to retrieve results.\n\nThe error toasts are illustrated by the
screenshots
below:\n\n![find_attack_discoveries_error](https://github.com/user-attachments/assets/c9af708e-d0bc-4d1b-bf16-a0af43456dc2)\n\n_Above:
An error toaster is displayed when `useFindAttackDiscoveries`
fails_\n\n![get_attack_discovery_generations_error](https://github.com/user-attachments/assets/5694ee39-562d-4a37-ab43-b16fd03040a2)\n\n_Above:
An error toaster is displayed when `useGetAttackDiscoveryGenerations`
fails_\n\n### Feature flags\n\nThe following
`securitySolution.attackDiscoveryAlertsEnabled` feature flag in
`config/kibana.dev.yml` is required to view the error
toasters:\n\n```yaml\nfeature_flags.overrides:\n
securitySolution.attackDiscoveryAlertsEnabled:
true\n```","sha":"db33a3faadb6cd2e08e7faf05581d7e69542996e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
SecuritySolution","Team:Security Generative
AI","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Attack
discovery] Show error toasts when useFindAttackDiscoveries and
useGetAttackDiscoveryGenerations
fail","number":225940,"url":"https://github.com/elastic/kibana/pull/225940","mergeCommit":{"message":"[Attack
discovery] Show error toasts when useFindAttackDiscoveries and
useGetAttackDiscoveryGenerations fail (#225940)\n\n## [Attack discovery]
Show error toasts when `useFindAttackDiscoveries` and
`useGetAttackDiscoveryGenerations` fail\n\nThis PR fixes an issue where
the Attack discovery page should display error toasts when the
`useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` hooks
fail to retrieve results.\n\nThe error toasts are illustrated by the
screenshots
below:\n\n![find_attack_discoveries_error](https://github.com/user-attachments/assets/c9af708e-d0bc-4d1b-bf16-a0af43456dc2)\n\n_Above:
An error toaster is displayed when `useFindAttackDiscoveries`
fails_\n\n![get_attack_discovery_generations_error](https://github.com/user-attachments/assets/5694ee39-562d-4a37-ab43-b16fd03040a2)\n\n_Above:
An error toaster is displayed when `useGetAttackDiscoveryGenerations`
fails_\n\n### Feature flags\n\nThe following
`securitySolution.attackDiscoveryAlertsEnabled` feature flag in
`config/kibana.dev.yml` is required to view the error
toasters:\n\n```yaml\nfeature_flags.overrides:\n
securitySolution.attackDiscoveryAlertsEnabled:
true\n```","sha":"db33a3faadb6cd2e08e7faf05581d7e69542996e"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225940","number":225940,"mergeCommit":{"message":"[Attack
discovery] Show error toasts when useFindAttackDiscoveries and
useGetAttackDiscoveryGenerations fail (#225940)\n\n## [Attack discovery]
Show error toasts when `useFindAttackDiscoveries` and
`useGetAttackDiscoveryGenerations` fail\n\nThis PR fixes an issue where
the Attack discovery page should display error toasts when the
`useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` hooks
fail to retrieve results.\n\nThe error toasts are illustrated by the
screenshots
below:\n\n![find_attack_discoveries_error](https://github.com/user-attachments/assets/c9af708e-d0bc-4d1b-bf16-a0af43456dc2)\n\n_Above:
An error toaster is displayed when `useFindAttackDiscoveries`
fails_\n\n![get_attack_discovery_generations_error](https://github.com/user-attachments/assets/5694ee39-562d-4a37-ab43-b16fd03040a2)\n\n_Above:
An error toaster is displayed when `useGetAttackDiscoveryGenerations`
fails_\n\n### Feature flags\n\nThe following
`securitySolution.attackDiscoveryAlertsEnabled` feature flag in
`config/kibana.dev.yml` is required to view the error
toasters:\n\n```yaml\nfeature_flags.overrides:\n
securitySolution.attackDiscoveryAlertsEnabled:
true\n```","sha":"db33a3faadb6cd2e08e7faf05581d7e69542996e"}}]}]
BACKPORT-->

Co-authored-by: Andrew Macri <andrew.macri@elastic.co>
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
…d useGetAttackDiscoveryGenerations fail (elastic#225940)

## [Attack discovery] Show error toasts when `useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` fail

This PR fixes an issue where the Attack discovery page should display error toasts when  the `useFindAttackDiscoveries` and `useGetAttackDiscoveryGenerations` hooks fail to retrieve results.

The error toasts are illustrated by the screenshots below:

![find_attack_discoveries_error](https://github.com/user-attachments/assets/c9af708e-d0bc-4d1b-bf16-a0af43456dc2)

_Above: An error toaster is displayed when `useFindAttackDiscoveries` fails_

![get_attack_discovery_generations_error](https://github.com/user-attachments/assets/5694ee39-562d-4a37-ab43-b16fd03040a2)

_Above: An error toaster is displayed when `useGetAttackDiscoveryGenerations` fails_

### Feature flags

The following `securitySolution.attackDiscoveryAlertsEnabled` feature flag in `config/kibana.dev.yml` is required to view the error toasters:

```yaml
feature_flags.overrides:
  securitySolution.attackDiscoveryAlertsEnabled: true
```
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.19.0 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants