-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Query Frontend: Add tests and fix previous bugs for instant query tripperware #5612
Conversation
@@ -34,6 +34,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re | |||
- [#5575](https://github.com/thanos-io/thanos/pull/5575) Receive: Add support for gRPC compression with snappy. | |||
- [#5508](https://github.com/thanos-io/thanos/pull/5508) Receive: Validate labels in write requests. | |||
- [#5439](https://github.com/thanos-io/thanos/pull/5439) Mixin: Add Alert ThanosQueryOverload to Mixin. | |||
- [#5561](https://github.com/thanos-io/thanos/pull/5561) Query Frontend: Support instant query sharding. |
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 added for previous pr.
cortexpb.Sample scalar = 1; | ||
StringSample stringSample = 2; | ||
Vector vector = 3; | ||
Matrix matrix = 4; |
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.
Handled all 4 cases mentioned in https://prometheus.io/docs/prometheus/latest/querying/api/#instant-queries.
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
93d3ddd
to
6ea881e
Compare
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 remember running an instant query with a range selector and getting an error, so something like http_requests_total[2m]
or http_requests_total[5m:1m]
. Can we cover this case with a unit test?
Tests added in 3804c99. PTAL |
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
b0a77fd
to
3804c99
Compare
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
cc @fpetkovski @GiedriusS for another look 😄 |
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.
Thanks!
Need another approval from maintainers and then we can start cutting the rc. |
💪 |
…pperware (thanos-io#5612) * fix string type result; add more tests for instant query sharding Signed-off-by: Ben Ye <ben.ye@bytedance.com> * fix imports Signed-off-by: Ben Ye <ben.ye@bytedance.com> * support matrix type response Signed-off-by: Ben Ye <ben.ye@bytedance.com> * add unit tests for decoding responses Signed-off-by: Ben Ye <ben.ye@bytedance.com> * rename ShardedRequest interface Signed-off-by: Ben Ye <ben.ye@bytedance.com> * fix lint Signed-off-by: Ben Ye <ben.ye@bytedance.com> Signed-off-by: Ben Ye <ben.ye@bytedance.com>
Signed-off-by: Ben Ye ben.ye@bytedance.com
Follow up PR for #5561.
Changes
string
andmatrix
for instant queries. Those types are not handled correctly in the previous pr.Verification