-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default the isEqual flag to true in alertmanager
Solves #2602 - the new version of alertmanager introduces an isEqual flag to support != matchers in alertmanager silences. Clients set this to true in the JSON blob sent to the api to indicate a foo=bar matcher, and to false to indicate foo!=bar. Due to gos unmarshalling, anything that _doesn't_ include this flag will default to false (i.e. a != matcher), so any clients that aren't aware of this flag (such as amtools before negative matchers and the new api) will not send it, and when you think you are making a foo=bar matcher, alertmanager will interpret that as a not equals. This commit changes the Unmarshaling of the v1matcher struct to default the IsEqual flag to true, to keep the old behaviour for clients not setting the flag Signed-off-by: sinkingpoint <[email protected]>
- Loading branch information
1 parent
5ad7a10
commit 6a072db
Showing
2 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters