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

Empty `group_left`/`group_right` isn't working in rules #1676

Closed
beorn7 opened this Issue May 27, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@beorn7
Copy link
Member

beorn7 commented May 27, 2016

I still have to understand why, but a group_left or group_right clause without any labels creates an evaluation error if in a rule:

WARN[0173] Error while evaluating rule "fake_rule{} = (chef_client_errors_count > 0) * ON(instance) GROUP_RIGHT() alerting_contact\n": parse error at char 59: unexpected ")" in grouping opts, expected identifier  source=manager.go:265

It appears the parser is adding an empty () at some point, which is then invalid syntax.

(In different news, group_right() should probably be legal and equivalent to group_right.)

@brian-brazil @fabxc

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented May 27, 2016

This is another outcome of alert rules parsing the string version of the rules.

I plan on making an empty list of labels valid, but there's a new feature I want to go with it (see #1597).

@beorn7

This comment has been minimized.

Copy link
Member Author

beorn7 commented May 27, 2016

So we need to fix the stringification of a PromQL expression.

Work around for now is to use group_left(dummy)...

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.