-
Notifications
You must be signed in to change notification settings - Fork 818
Update prometheus to latest #763
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
Conversation
Needs some tweak to compile. |
OK, maybe more than tweaks. |
I made those changes. I did not look more closely whether the underlying Prometheus changes let us remove some shim layers. |
I will take a look at test failures now. |
f798758
to
0571f24
Compare
0571f24
to
871ab87
Compare
cmd/querier/main.go
Outdated
@@ -91,13 +92,16 @@ func main() { | |||
sampleQueryable := querier.NewQueryable(dist, chunkStore, false) | |||
metadataQueryable := querier.NewQueryable(dist, chunkStore, true) | |||
|
|||
engine := promql.NewEngine(sampleQueryable, nil) | |||
maxConcurrent := 20 | |||
timeout := 2 * time.Minute |
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.
Both of these should be command-line parameters.
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.
let's put these in querier config
cmd/querier/main.go
Outdated
api := v1.NewAPI( | ||
engine, | ||
metadataQueryable, | ||
querier.DummyTargetRetriever{}, | ||
querier.DummyAlertmanagerRetriever{}, | ||
func() config.Config { return config.Config{} }, | ||
map[string]string{}, // TODO: include configuration flags |
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.
?
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.
this is a recent addition to allow flags to be shown via api endpoint - prometheus/prometheus#3864
We will need to include querier flags 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.
OK; I think we can happily pass blank.
@bboreham I think the change you made here: https://github.com/weaveworks/cortex/pull/763/files#diff-bf05432384ae7a97e67ae71efaf68ffcR201 requires slightly different args.
|
Created querier.Config for query engine config and used in |
aaea966
to
883c457
Compare
Why would we particularly want to follow the promql defaults? |
The ruler config has:
The new parameters we need to pass:
Is the If we do share these values, should the config names be more generic and not ruler specific? |
The number of workers in the ruler is also the maximum number of queries the ruler will issue at the same time. We don’t need another bound. The group timeout is an upper bound on the time allowed for a single query; this seems close enough to just use it, in the ruler. The querier is different. I can’t see an alternative to adding parameters for it. Maybe unify with the ruler, but removing the ruler-specific ones has to be done carefully. |
Is it OK if I pick this up and fix it? |
81d1588
to
1319a27
Compare
Sorry, other stuff took priority after on-call. I pushed the change to reuse ruler config - after looking at how the ruler evals groups (sequentially) I agree we should be reusing ruler params.
If there are any other changes to make, sure, please feel free to make them and I can then review. |
Thanks! I added one commit, taking out a couple of TODOs |
Couple of odd-looking files under |
Yep, these were removed in last commit after |
This reverts commit 6252335. The new Prometheus web api is incompatible with the scheme Cortex uses to differentiate sample from metadata queries.
github.com/prometheus/prometheus
to latestgithub.1485827954.workers.dev/prometheus/tsdb
to latestmake update-vendor
querier.Config
forMaxConcurrent
andTimeout
Fixes #762 via prometheus/prometheus#3995 - fsnotify was moved and broke dep here.