Skip to content

Check that at least one silence matcher matches a non-empty string#2081

Merged
simonpasquier merged 2 commits into
prometheus:masterfrom
qoops-1:check-nonempty-matcher
Oct 31, 2019
Merged

Check that at least one silence matcher matches a non-empty string#2081
simonpasquier merged 2 commits into
prometheus:masterfrom
qoops-1:check-nonempty-matcher

Conversation

@qoops-1
Copy link
Copy Markdown
Contributor

@qoops-1 qoops-1 commented Oct 23, 2019

Closes #1897

Signed-off-by: qoops <ilya.v.gladyshev@gmail.com>
Comment thread silence/silence.go Outdated
allMatchEmpty = allMatchEmpty && matchesEmpty(m)
}
if allMatchEmpty {
return errors.New("at least one matcher must not match empty string")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(nit) "at least one matcher must not match the empty string"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Signed-off-by: qoops <ilya.v.gladyshev@gmail.com>
Copy link
Copy Markdown
Member

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

👍

@mxinden
Copy link
Copy Markdown
Member

mxinden commented Oct 31, 2019

@simonpasquier was there anything else missing for this pull request?

@simonpasquier simonpasquier merged commit 196c62f into prometheus:master Oct 31, 2019
@simonpasquier
Copy link
Copy Markdown
Member

Thanks!

@simonpasquier simonpasquier changed the title At least one non-empty silence matcher Check that at least one silence matcher matches a non-empty string Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add check that at least one silence matcher matches non-empty

3 participants