-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cause promql/regexp check to fail #2
Conversation
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.
This pull request was validated by pint.
❗ Problems found.
Severity | Number of problems |
---|---|
Bug | 1 |
Stats
Stat | Value |
---|---|
Version | 0.57.2 |
Number of rules parsed | 1 |
Number of rules checked | 1 |
Number of problems found | 1 |
Number of offline checks | 6 |
Number of online checks | 0 |
Checks duration | 0 |
Problems
alerts/test.yaml:5-10 Bug: Unnecessary regexp match on static string `group!~"one-last-test-job"`, use `group!="one-last-test-job"` instead. (promql/regexp)
5 | expr: >
6 | sum(test_metric{
7 | group=~"test*",
8 | group!~"another-test-job.*",
9 | group!~"one-last-test-job",
10 | }) by (env, cluster) > 50
alerts/test.yaml
Outdated
@@ -5,7 +5,7 @@ groups: | |||
expr: > | |||
sum(test_metric{ | |||
group=~"test*", | |||
group!~"another-test-job.*", | |||
group!~"another-test-job", |
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.
🛑 promql/regexp: Unnecessary regexp match on static string group!~"another-test-job"
, use group!="another-test-job"
instead.
See Prometheus documentation for details on how vector selectors work.
@@ -6,7 +6,7 @@ groups: | |||
sum(test_metric{ | |||
group=~"test*", | |||
group!~"another-test-job.*", | |||
group!~"one-last-test-job.*", | |||
group!~"one-last-test-job", |
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.
🛑 promql/regexp: Unnecessary regexp match on static string group!~"one-last-test-job"
, use group!="one-last-test-job"
instead.
See Prometheus documentation for details on how vector selectors work.
No description provided.