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
Bug 1870474: Show monitoring alert decorator for alerts that are warning/error #6209
Bug 1870474: Show monitoring alert decorator for alerts that are warning/error #6209
Conversation
8243230
to
04b6f8b
Compare
/kind bug |
/cc @vikram-raj |
/cc @cshinn |
/test e2e-gcp-console |
severityAlertType === AlertSeverity.None || | ||
severityAlertType === AlertSeverity.Info ? null : ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
severityAlertType === AlertSeverity.None || | |
severityAlertType === AlertSeverity.Info ? null : ( | |
[AlertSeverity.None, AlertSeverity.Info].includes(severityAlertType) ? null : ( |
04b6f8b
to
3fa141d
Compare
firingAlerts.length === 0 || | ||
severityAlertType === AlertSeverity.None || | ||
severityAlertType === AlertSeverity.Info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is repeating at multiple places. Can we create util for this? So, it will easy to maintain also.
3fa141d
to
fc56484
Compare
fc56484
to
6622ace
Compare
firingAlerts: Alert[], | ||
severityAlertType: AlertSeverity, | ||
): boolean => | ||
firingAlerts.length === 0 || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the getSeverityAlertType
method were to return AlertSeverity.None
when no alerts were passed (rather than null) this could be removed and the alerts would not need to be passed.
6622ace
to
afb8e01
Compare
/test e2e-gcp-console |
@@ -72,7 +73,7 @@ const ObservedTopologyListViewNode: React.FC<TopologyListViewNodeProps & Dispatc | |||
onSelectTab('Monitoring'); | |||
}; | |||
const severityAlertType = getSeverityAlertType(alerts); | |||
alertIndicator = ( | |||
alertIndicator = [AlertSeverity.None, AlertSeverity.Info].includes(severityAlertType) ? null : ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alertIndicator = [AlertSeverity.None, AlertSeverity.Info].includes(severityAlertType) ? null : ( | |
alertIndicator = shouldHideMonitoringAlertDecorator(severityAlertType) ? null : ( |
afb8e01
to
4c81d75
Compare
/lgtm |
/test e2e-gcp-console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/retest |
/test e2e-gcp-console |
/assign @invincibleJai |
/assign @christianvogt |
Verified locally seems to work as expected |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, cshinn, debsmita1, jeff-phillips-18 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@debsmita1: This pull request references Bugzilla bug 1870474, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@debsmita1: All pull requests linked via external trackers have merged: openshift/console#6209. Bugzilla bug 1870474 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes:
https://issues.redhat.com/browse/ODC-4432
Root Analysis:
currently monitoring alert decorator is also being shown for alerts having severity as
info
Solution Description:
GIF: