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

[Alert details page] Use related alerts logic only for the custom threshold rule #193957

Merged
merged 7 commits into from
Sep 25, 2024

Conversation

maryam-saeidi
Copy link
Member

@maryam-saeidi maryam-saeidi commented Sep 25, 2024

Closes #193943

Summary

This PR only loads related alerts for the custom threshold rule and only when the related rule has tags or group by fields.

For now, we don't show this tab if there is no tag or group and there is a follow-up ticket for discussing the empty state for the related alerts.

Follow-up work

@maryam-saeidi maryam-saeidi self-assigned this Sep 25, 2024
@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@maryam-saeidi maryam-saeidi added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:obs-ux-management Observability Management User Experience Team release_note:skip Skip the PR/issue when compiling release notes labels Sep 25, 2024
@maryam-saeidi maryam-saeidi marked this pull request as ready for review September 25, 2024 09:53
@maryam-saeidi maryam-saeidi requested a review from a team as a code owner September 25, 2024 09:53
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Sep 25, 2024
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #3 / when rolling back to an older version kibana should detect that a later version alias exists, and abort

Metrics [docs]

Async chunks

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

id before after diff
observability 467.2KB 467.2KB -6.0B

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

cc @maryam-saeidi

Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

LGTM, just one question

Comment on lines +118 to +120
useEffect(() => {
setRelatedAlertsKuery(getRelatedAlertKuery(tags, groups));
}, [groups, setRelatedAlertsKuery, tags]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to check for empty groups or tags array? Or that's not possible?

Copy link
Member Author

Choose a reason for hiding this comment

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

This will be handled in getRelatedAlertKuery:

getRelatedAlertKuery = (tags?: string[], groups?: Group[])

@maryam-saeidi maryam-saeidi merged commit 387afb7 into elastic:main Sep 25, 2024
24 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 25, 2024
…eshold rule (elastic#193957)

Closes elastic#193943

### Summary

This PR only loads related alerts for the custom threshold rule and only
when the related rule has tags or group by fields.

For now, we don't show this tab if there is no tag or group and there is
a follow-up ticket for discussing the empty state for the related
alerts.

#### Follow-up work
- elastic#193952
- elastic#193942

(cherry picked from commit 387afb7)
@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

@maryam-saeidi maryam-saeidi deleted the 193943-ct-related-alerts branch September 25, 2024 12:55
kibanamachine added a commit that referenced this pull request Sep 25, 2024
…om threshold rule (#193957) (#193991)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Alert details page] Use related alerts logic only for the custom
threshold rule (#193957)](#193957)

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

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

<!--BACKPORT [{"author":{"name":"Maryam
Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2024-09-25T12:43:52Z","message":"[Alert
details page] Use related alerts logic only for the custom threshold
rule (#193957)\n\nCloses #193943\r\n\r\n### Summary\r\n\r\nThis PR only
loads related alerts for the custom threshold rule and only\r\nwhen the
related rule has tags or group by fields.\r\n\r\nFor now, we don't show
this tab if there is no tag or group and there is\r\na follow-up ticket
for discussing the empty state for the related\r\nalerts.\r\n\r\n####
Follow-up work\r\n- #193952
#193942
details page] Use related alerts logic only for the custom threshold
rule","number":193957,"url":"#193957
details page] Use related alerts logic only for the custom threshold
rule (#193957)\n\nCloses #193943\r\n\r\n### Summary\r\n\r\nThis PR only
loads related alerts for the custom threshold rule and only\r\nwhen the
related rule has tags or group by fields.\r\n\r\nFor now, we don't show
this tab if there is no tag or group and there is\r\na follow-up ticket
for discussing the empty state for the related\r\nalerts.\r\n\r\n####
Follow-up work\r\n- #193952
#193942
details page] Use related alerts logic only for the custom threshold
rule (#193957)\n\nCloses #193943\r\n\r\n### Summary\r\n\r\nThis PR only
loads related alerts for the custom threshold rule and only\r\nwhen the
related rule has tags or group by fields.\r\n\r\nFor now, we don't show
this tab if there is no tag or group and there is\r\na follow-up ticket
for discussing the empty state for the related\r\nalerts.\r\n\r\n####
Follow-up work\r\n- #193952
#193942"}}]}]
BACKPORT-->

Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Alert details page] Use related alerts logic only for the custom threshold rule
6 participants