Ruler API and ObjectStore Backend#2269
Conversation
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
…c checks Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
pstibrany
left a comment
There was a problem hiding this comment.
Nice work.
I'd like to see changes to remove some code duplication in api.go, and unit test or two for escaping namespaces and groups in the request paths, to make sure it's not broken by accident in the future, but overall 👍
Co-Authored-By: Peter Štibraný <peter.stibrany@grafana.com> Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
f0c09ba to
5d88330
Compare
pstibrany
left a comment
There was a problem hiding this comment.
Nice improvements! There are few missing returns in methods, my other comments are mostly nitpicking.
| // RegisterRoutes registers the ruler API HTTP routes with the provided Router. | ||
| func (r *Ruler) RegisterRoutes(router *mux.Router) { | ||
| func (r *Ruler) RegisterRoutes(router *mux.Router, middleware middleware.Interface) { | ||
| router = router.UseEncodedPath() |
There was a problem hiding this comment.
One possible way to test it would be to have muxVars global variable, that defaults to mux.Vars but could be set to your own function in tests.
One way would be injecting them into the ctx of the request that is passed to the function. But I feel like it's more important to have integration tests for this behavior since the interplay with the gorilla router is so important. |
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
pstibrany
left a comment
There was a problem hiding this comment.
Thanks for addressing my feedback!
API Changes
This PR adds an API to the ruler service based on this design document (https://docs.google.com/document/d/1gNKiC5L_zWQ4GGgtdhJJ6FnaZXyJJBvdGTUmF0wgEFg/edit?usp=sharing)
Object Storage Changes
chunk.ObjectClientinterfaceIntegration Tests
Which issue(s) this PR fixes:
Related #1547 #1244
Checklist
CHANGELOG.md