-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support UTF-8 label matchers: Add test for PromQL braces when parsing lists of matchers #3507
Support UTF-8 label matchers: Add test for PromQL braces when parsing lists of matchers #3507
Conversation
e6827e7
to
7785118
Compare
Signed-off-by: George Robinson <george.robinson@grafana.com>
@gotjosh could you restart |
I don't think this is what I meant with #3453 (comment) My understanding is that the support of This is assuming that if we're all done with the parser today we'd have no actual coverage for this scenario - if you have any other ideas or I'm just completely off please feel free to tell me so. |
Signed-off-by: George Robinson <george.robinson@grafana.com>
As discussed offline, we are going to replace the unit test with acceptance tests. I've just pushed that commit this morning, and so a second review would be great whenever convenient! 🙂 |
Signed-off-by: George Robinson <george.robinson@grafana.com>
silence2 := Silence(0, 4).Match("foo").Comment("test foo") | ||
silence1 := Silence(0, 4).Match("test1", "severity=warn").Comment("test1") | ||
silence2 := Silence(0, 4).Match("alertname=test2", "severity=warn").Comment("test2") | ||
silence3 := Silence(0, 4).Match("{alertname=test3}", "severity=warn").Comment("test3") |
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.
@gotjosh here I create a silence with the following labels:
alertname="{alertname=test3}"
severity=warn
We will be able to then see this behaviour break when we use the new fallback parser as without the additional check we talked about in #3453 (comment), it will create a silence with the following labels instead:
alertname=test3
severity=warn
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
…#3507) * Add test for PromQL braces when parsing lists of matchers Signed-off-by: George Robinson <george.robinson@grafana.com> * Use acceptance tests Signed-off-by: George Robinson <george.robinson@grafana.com> * Add test creating silence with braces Signed-off-by: George Robinson <george.robinson@grafana.com> --------- Signed-off-by: George Robinson <george.robinson@grafana.com> Signed-off-by: Yijie Qin <qinyijie@amazon.com>
…#3507) * Add test for PromQL braces when parsing lists of matchers Signed-off-by: George Robinson <george.robinson@grafana.com> * Use acceptance tests Signed-off-by: George Robinson <george.robinson@grafana.com> * Add test creating silence with braces Signed-off-by: George Robinson <george.robinson@grafana.com> --------- Signed-off-by: George Robinson <george.robinson@grafana.com> Signed-off-by: Yijie Qin <qinyijie@amazon.com>
…#3507) * Add test for PromQL braces when parsing lists of matchers Signed-off-by: George Robinson <george.robinson@grafana.com> * Use acceptance tests Signed-off-by: George Robinson <george.robinson@grafana.com> * Add test creating silence with braces Signed-off-by: George Robinson <george.robinson@grafana.com> --------- Signed-off-by: George Robinson <george.robinson@grafana.com>
…#3507) * Add test for PromQL braces when parsing lists of matchers Signed-off-by: George Robinson <george.robinson@grafana.com> * Use acceptance tests Signed-off-by: George Robinson <george.robinson@grafana.com> * Add test creating silence with braces Signed-off-by: George Robinson <george.robinson@grafana.com> --------- Signed-off-by: George Robinson <george.robinson@grafana.com>
This pull request has been added to address the discussion #3453 (comment). Should be merged before #3483.