Skip to content
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

Merged
merged 6 commits into from
Aug 22, 2022

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Aug 19, 2022

Signed-off-by: Ben Ye ben.ye@bytedance.com

Follow up PR for #5561.

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

  1. Add the missing changelog.
  2. Add more test cases and PromQL compatibility tests for query frontend with sharding.
  3. Fix results to handle string and matrix for instant queries. Those types are not handled correctly in the previous pr.

Verification

@@ -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.
Copy link
Contributor Author

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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yeya24 yeya24 changed the title fix string type result; add more tests for instant query sharding Query Frontend: Add tests and fix previous bugs for instant query tripperware Aug 19, 2022
Ben Ye added 3 commits August 19, 2022 00:19
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>
@yeya24 yeya24 force-pushed the handle-string-result branch from 93d3ddd to 6ea881e Compare August 19, 2022 07:20
Copy link
Contributor

@fpetkovski fpetkovski left a 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?

@yeya24
Copy link
Contributor Author

yeya24 commented Aug 20, 2022

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>
@yeya24 yeya24 force-pushed the handle-string-result branch from b0a77fd to 3804c99 Compare August 20, 2022 18:43
Ben Ye added 2 commits August 20, 2022 11:54
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
@yeya24
Copy link
Contributor Author

yeya24 commented Aug 21, 2022

cc @fpetkovski @GiedriusS for another look 😄

Copy link
Contributor

@fpetkovski fpetkovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@yeya24 yeya24 enabled auto-merge (squash) August 22, 2022 06:39
@yeya24
Copy link
Contributor Author

yeya24 commented Aug 22, 2022

Need another approval from maintainers and then we can start cutting the rc.

@yeya24 yeya24 merged commit 6e6a486 into thanos-io:main Aug 22, 2022
@GiedriusS
Copy link
Member

💪

GiedriusS pushed a commit to vinted/thanos that referenced this pull request Aug 25, 2022
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants