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

Bug 1870474: Show monitoring alert decorator for alerts that are warning/error #6209

Merged

Conversation

debsmita1
Copy link
Contributor

@debsmita1 debsmita1 commented Aug 4, 2020

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:

  • the monitoring alert decorator is being shown on the topology workload only for alerts with severity critical or warning
  • unit tests

GIF:
remove-alert-info
critical

@openshift-ci-robot openshift-ci-robot added component/core Related to console core functionality component/dev-console Related to dev-console component/shared Related to console-shared labels Aug 4, 2020
@debsmita1
Copy link
Contributor Author

/kind bug

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 5, 2020
@invincibleJai
Copy link
Member

/cc @vikram-raj

@debsmita1
Copy link
Contributor Author

/cc @cshinn

@debsmita1
Copy link
Contributor Author

/test e2e-gcp-console

Comment on lines 77 to 78
severityAlertType === AlertSeverity.None ||
severityAlertType === AlertSeverity.Info ? null : (
Copy link
Member

Choose a reason for hiding this comment

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

nit:

Suggested change
severityAlertType === AlertSeverity.None ||
severityAlertType === AlertSeverity.Info ? null : (
[AlertSeverity.None, AlertSeverity.Info].includes(severityAlertType) ? null : (

Comment on lines 50 to 52
firingAlerts.length === 0 ||
severityAlertType === AlertSeverity.None ||
severityAlertType === AlertSeverity.Info
Copy link
Member

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.

firingAlerts: Alert[],
severityAlertType: AlertSeverity,
): boolean =>
firingAlerts.length === 0 ||
Copy link
Member

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.

@debsmita1
Copy link
Contributor Author

/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 : (
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
alertIndicator = [AlertSeverity.None, AlertSeverity.Info].includes(severityAlertType) ? null : (
alertIndicator = shouldHideMonitoringAlertDecorator(severityAlertType) ? null : (

@jeff-phillips-18
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 11, 2020
@debsmita1
Copy link
Contributor Author

/test e2e-gcp-console

Copy link

@cshinn cshinn left a comment

Choose a reason for hiding this comment

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

LGTM

@abhi-kn
Copy link
Contributor

abhi-kn commented Aug 17, 2020

/retest

@debsmita1
Copy link
Contributor Author

/test e2e-gcp-console

@debsmita1
Copy link
Contributor Author

/assign @invincibleJai

@invincibleJai
Copy link
Member

/assign @christianvogt

@invincibleJai
Copy link
Member

Verified locally seems to work as expected

@christianvogt
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 19, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@debsmita1 debsmita1 changed the title Show monitoring alert decorator for alerts that are warning/error Bug 1870474: Show monitoring alert decorator for alerts that are warning/error Aug 20, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Aug 20, 2020
@openshift-ci-robot
Copy link
Contributor

@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
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1870474: Show monitoring alert decorator for alerts that are warning/error

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.

@openshift-merge-robot openshift-merge-robot merged commit 0a990f4 into openshift:master Aug 20, 2020
@openshift-ci-robot
Copy link
Contributor

@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:

Bug 1870474: Show monitoring alert decorator for alerts that are warning/error

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.

@spadgett spadgett added this to the v4.6 milestone Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/core Related to console core functionality component/dev-console Related to dev-console component/shared Related to console-shared kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet