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

API: Add limit param in metadata APIs #7609

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

harry671003
Copy link
Contributor

@harry671003 harry671003 commented Aug 7, 2024

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

Changes

Prometheus recently introduced limit param in metadata APIs to allow users to opt for a limited number of results.

This PR implements the limit param in Thanos API.

Verification

  • Updated the unit tests to cover the case of when limit is passed.

Related

Signed-off-by: 🌲 Harry 🌊 John 🏔 <johrry@amazon.com>
@harry671003 harry671003 force-pushed the implement_limit_in_api branch from 384aff2 to a211347 Compare August 7, 2024 19:15
@harry671003 harry671003 changed the title Metadata API: Add limit param API: Implement limit param in metadata APIs Aug 7, 2024
@harry671003 harry671003 changed the title API: Implement limit param in metadata APIs API: Add limit param in metadata APIs Aug 7, 2024
@harry671003 harry671003 marked this pull request as ready for review August 7, 2024 19:44
saswatamcode
saswatamcode previously approved these changes Aug 8, 2024
Copy link
Member

@saswatamcode saswatamcode left a comment

Choose a reason for hiding this comment

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

Thanks! Just one small question

pkg/api/query/v1.go Show resolved Hide resolved
Signed-off-by: 🌲 Harry 🌊 John 🏔 <johrry@amazon.com>
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

Thanks. Great work

@@ -16,6 +16,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
* [#7592](https://github.com/thanos-io/thanos/pull/7592) Ruler: Only increment `thanos_rule_evaluation_with_warnings_total` metric for non PromQL warnings.

### Added
* [7609](https://github.com/thanos-io/thanos/pull/7609) API: Add limit param to metadata APIs (series, label names, label values).
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can omit the changelog here and add in the actual store implementation PR.
But not a big deal. We can update the changelog when you create another PR

Copy link
Contributor

Choose a reason for hiding this comment

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

This missed #. We can fix in your next pr

@yeya24 yeya24 merged commit a3a7c3b into thanos-io:main Aug 8, 2024
19 of 20 checks passed
jnyi pushed a commit to jnyi/thanos that referenced this pull request Oct 17, 2024
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.

4 participants