Anchor silence regex rules#748
Anchor silence regex rules#748fabxc merged 1 commit intoprometheus:masterfrom prymitive:anchor-rules
Conversation
When user creates a new silence with regex match it's left to the user to anchor it, which is not consistent with Prometheus regex handling (promql/functions.go#L818).
|
@fabxc Was there a reason for this not being anchored? |
|
I think it should be consistent. There's an obvious problem here of course. Already created silences will stop working. |
|
I think consistency is important. In addition the same arguments about overmatching due to no anchoring as apply in PromQL&relabelling also apply here. How this is handled UI wise is a separate question. |
|
@brian-brazil what I mean is, we should of course change it. But this could mean that users upgrading have existing silences that will no longer match. Probably okay when coming with a disclaimer. |
|
Yea, we'd want to signal this clearly. |
I think this is more complicated - this change will either break or fix silence rules for people - depending on the intent they had when creating those, and that can easily vary from user to user in the same organisation using Prometheus. |
Absolutely. It should have been "will potentially stop working as before". |
|
I will add this to 0.6.2 – potentially disruptive but as behavior was previously unspecified, it's not really a breaking change. |
When user creates a new silence with regex match it's left to the user to anchor it, which is not consistent with Prometheus regex handling (promql/functions.go#L818).
CC @stuartnelson3