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 2115347: Monitoring: Add support for Alertmanager negative matchers #12139

Conversation

kyoto
Copy link
Member

@kyoto kyoto commented Oct 6, 2022

Alertmanager now supports "negative matchers", which invert the meaning of a label / value matcher. The negative matcher checkbox changes = (value equals) into != (value does not equal) and changes =~ (value matches regex) in to !~ (value does not match regex).

This fixes a bug where Alertmanager silences with negative matchers were not handled correctly. The negative matcher flag was ignored, so they were treated as normal (= or =~) matchers.

Also changes the "Use RegEx" checkbox label to just "RegEx" to give space for the new checkbox.

screenshot

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Oct 6, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 6, 2022

@kyoto: This pull request references Bugzilla bug 2115347, which is invalid:

  • expected the bug to target the "4.12.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

[WIP] Bug 2115347: Monitoring: Add support for Alertmanager negative matchers

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-ci openshift-ci bot added component/core Related to console core functionality component/monitoring Related to monitoring approved Indicates a PR has been approved by an approver from all required OWNERS files. component/sdk Related to console-plugin-sdk kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Oct 6, 2022
@kyoto
Copy link
Member Author

kyoto commented Oct 6, 2022

/bugzilla refresh

@openshift-ci openshift-ci bot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Oct 6, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 6, 2022

@kyoto: This pull request references Bugzilla bug 2115347, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.12.0) matches configured target release for branch (4.12.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @yapei

In response to this:

/bugzilla refresh

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-ci openshift-ci bot requested a review from yapei October 6, 2022 04:15
@kyoto
Copy link
Member Author

kyoto commented Oct 6, 2022

/retest

@RickJWagner
Copy link

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Oct 6, 2022
@TanyaShearonRH
Copy link

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Oct 13, 2022
@kyoto kyoto force-pushed the monitoring-silence-negative-matchers branch from ac334ae to dbedaf4 Compare October 24, 2022 14:53
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 24, 2022

@kyoto: This pull request references Bugzilla bug 2115347, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.12.0) matches configured target release for branch (4.12.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @yapei

In response to this:

[WIP] Bug 2115347: Monitoring: Add support for Alertmanager negative matchers

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.

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 24, 2022
@kyoto kyoto changed the title [WIP] Bug 2115347: Monitoring: Add support for Alertmanager negative matchers Bug 2115347: Monitoring: Add support for Alertmanager negative matchers Oct 24, 2022
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 24, 2022
@kyoto
Copy link
Member Author

kyoto commented Oct 25, 2022

/retest

Alertmanager now supports "negative matchers", which invert the meaning
of a label / value matcher. The negative matcher checkbox changes `=`
(value equals) into `!=` (value does not equal) and changes `=~` (value
matches regex) in to `!~` (value does not match regex).

This fixes a bug where Alertmanager silences with negative matchers were
not handled correctly. The negative matcher flag was ignored, so they
were treated as normal (`=` or `=~`) matchers.
@kyoto kyoto force-pushed the monitoring-silence-negative-matchers branch from dbedaf4 to 64e4970 Compare October 25, 2022 01:25
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 25, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 25, 2022

@kyoto: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@jgbernalp
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 25, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 25, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgbernalp, kyoto, spadgett

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-merge-robot openshift-merge-robot merged commit cc11930 into openshift:master Oct 25, 2022
6 checks passed
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 25, 2022

@kyoto: All pull requests linked via external trackers have merged:

Bugzilla bug 2115347 has been moved to the MODIFIED state.

In response to this:

Bug 2115347: Monitoring: Add support for Alertmanager negative matchers

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.

@kyoto kyoto deleted the monitoring-silence-negative-matchers branch October 25, 2022 05:45
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/monitoring Related to monitoring component/sdk Related to console-plugin-sdk docs-approved Signifies that Docs has signed off on this PR kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants