-
Notifications
You must be signed in to change notification settings - Fork 532
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
Update vendored prometheus #8295
Conversation
…roup config and deprecating evaluation_delay Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
@@ -82,6 +83,7 @@ | |||
* [BUGFIX] Store-gateway: Allow long-running index scans to be interrupted. #8154 | |||
* [BUGFIX] Query-frontend: fix splitting of queries using `@ start()` and `@end()` modifiers on a subquery. Previously the `start()` and `end()` would be evaluated using the start end end of the split query instead of the original query. #8162 | |||
* [BUGFIX] Distributor: Don't discard time series with invalid exemplars, just drop affected exemplars. #8224 | |||
* [BUGFIX] Ingester: fixed in-memory series count when replaying a corrupted WAL. #8295 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewers: this is related to prometheus/prometheus#14079.
@@ -211,3 +211,8 @@ The following features or configuration parameters are currently deprecated and | |||
- `-ingester.client.report-grpc-codes-in-instrumentation-label-enabled` | |||
- Mimirtool | |||
- the flag `--rule-files` | |||
|
|||
The following features or configuration parameters are currently deprecated and will be **removed in a future release (to be announced)**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewers: I want to keep evaluation_delay
support for longer.
@@ -1071,7 +1124,7 @@ rules: | |||
|
|||
router.ServeHTTP(w, req) | |||
require.Equal(t, 200, w.Code) | |||
require.YAMLEq(t, tt.output, w.Body.String()) | |||
require.YAMLEq(t, tt.input, w.Body.String()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewers: we can simplify the test. We expect to receive the same YAML we uploaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree, although isn't that because we don't test 0 value here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. If we would test the 0 value the output would be different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, small typo nit
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one comment, non-blocking, I don't need to look at this again.
Thanks again for bringing these changes in.
@@ -330,7 +330,7 @@ func DefaultTenantManagerFactory( | |||
ForGracePeriod: cfg.ForGracePeriod, | |||
ResendDelay: cfg.ResendDelay, | |||
AlwaysRestoreAlertState: true, | |||
DefaultEvaluationDelay: func() time.Duration { | |||
DefaultRuleQueryOffset: func() time.Duration { | |||
// Delay the evaluation of all rules by a set interval to give a buffer | |||
// to metric that haven't been forwarded to Mimir yet. | |||
return overrides.EvaluationDelay(userID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit [non-blocking]: At some point, we probably want to create a new limit so that it matches the description a bit more accurately. Happy to create an issue for it if you think it's worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree we should but looks very low priority. I'm fine creating an issue for now.
What this PR does
In this PR I'm updating mimir-prometheus to get the changes synced in grafana/mimir-prometheus#639.
The main change affecting Mimir is the introduction of
query_offset
in rule group config, which deprecatesevaluation_delay
. In this PR I propose to do the safest change in Mimir, which is mappingquery_offset
andevaluation_delay
independently in the rule group config we store in the object storage, so that when a tenant downloads a previously loaded config they get the same exact YAML. This is a property I would like to preserve for now, in case any customer runs a reconcile loop comparing the local YAML config with the one stored in Mimir (read via API): I prefer to make sure the two YAMLs always match (which wouldn't be true if we manipulate the YAML config to setquery_offset
to the value ofevaluation_delay
when it's not set).Manual tests
I've run manual tests with
mimirtool
downloaded from Mimir 2.12.0 release andmimirtool
built on top of this PR.Test results against Mimir running from this
branch
:mimirtool
2.12.0evaluation_delay
query_offset
(expected)mimirtool
this branchevaluation_delay
andquery_offset
mimirtool
2.12.0evaluation_delay
query_offset
if remote config contains it (expected), but doesn't failmimirtool
this branchevaluation_delay
andquery_offset
Test results against Mimir running from
main
:mimirtool
this branchevaluation_delay
query_offset
but server ignores it (a subsequentrules get
doesn't return it)mimirtool
this branchevaluation_delay
Which issue(s) this PR fixes or relates to
N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.