ruler: fix the /api/v1/rules endpoint#1773
Merged
bwplotka merged 4 commits intothanos-io:masterfrom Nov 22, 2019
Merged
Conversation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2d195e6 to
cd6271c
Compare
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
e57bf1d to
cbfac08
Compare
Contributor
|
/cc @bwplotka |
bwplotka
approved these changes
Nov 22, 2019
Member
bwplotka
left a comment
There was a problem hiding this comment.
Some comments, otherwise LGTM (:
pkg/rule/api/v1_test.go
Outdated
| expr1, err := promql.ParseExpr(`absent(test_metric3) != 1`) | ||
| if err != nil { | ||
| m.testing.Fatalf("unable to parse alert expression: %s", err) | ||
| panic(fmt.Sprintf("unable to parse alert expression: %s", err)) |
Contributor
Author
There was a problem hiding this comment.
Because it should never fail but I can revert if you prefer.
CHANGELOG.md
Outdated
| - [#1669](https://github.com/thanos-io/thanos/pull/1669) Fixed store sharding. Now it does not load excluded meta.jsons and load/fetch index-cache.json files. | ||
| - [#1670](https://github.com/thanos-io/thanos/pull/1670) Fixed un-ordered blocks upload. Sidecar now uploads the oldest blocks first. | ||
| - [#1568](https://github.com/thanos-io/thanos/pull/1709) Thanos Store now retains the first raw value of a chunk during downsampling to avoid losing some counter resets that occur on an aggregation boundary. | ||
| - [#1773](https://github.com/thanos-io/thanos/pull/1773) Thanos Ruler: fixed the /api/v1/rules endpoint. |
Member
There was a problem hiding this comment.
Can we tell users what exactly problem was fixed?
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Contributor
|
thanks @bwplotka for the review and @simonpasquier for the contribution! 🎉 |
IKSIN
pushed a commit
to monitoring-tools/thanos
that referenced
this pull request
Nov 26, 2019
* test/e2e: test alerts and rules API endpoints Signed-off-by: Simon Pasquier <spasquie@redhat.com> * pkg/rule: fix /api/v1/rules endpoint Signed-off-by: Simon Pasquier <spasquie@redhat.com> * Address Bartek's comments Signed-off-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Aleksey Sin <asin@ozon.ru>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1189
Changes
Fixed the switch type in the
ruleshandler because alerting rules are instances of*rules.AlertingRule, notthanosrule.AlertingRule. This is because the rules are returned from the Prometheus rule managers and have no notion ofPartialResponseStrategy.Verification
The
/api/v1/rulesand/api/v1/alertsendpoints are now covered by the end-to-end tests.