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

subtle change in regex parsing? #1518

Closed
harmw opened this Issue Apr 1, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@harmw
Copy link

harmw commented Apr 1, 2016

We just upgraded from 0.16 to 0.17 and are observing the following change in behavior.

Our Grafana dashboards are sending queries like this:

service_http_server{job="blaze-gateway",status=~"^2"}

This used to work just fine, but now returns no data.
The same is true for this variation of the same query:

service_http_server{job="blaze-gateway",status=~"^20"}

However, the following all do work and return data points:

service_http_server{job="blaze-gateway",status=~"^2.*"}
service_http_server{job="blaze-gateway",status=~"^2.+"}
service_http_server{job="blaze-gateway",status=~"^200"}

Did something subtle change in this area?

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Apr 1, 2016

Yes, check Regular expression matchers in PromQL are anchored in the changelog. This behavior changed in 0.17.0.

There used to be an example for that in the changelog: 7a0c0c3

@harmw

This comment has been minimized.

Copy link
Author

harmw commented Apr 1, 2016

That diff shows exactly what is going on, thanks! Looks like we'll have to change some of our queries 😄
As a sidenote, I don't feel that piece of text is just noise since it's a perfect example of what someone needs to change.

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Apr 1, 2016

Well, as the author of that "noise" I totally agree. @brian-brazil and @fabxc had different opinions about this. There have been many questions about this regex change already.

@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.