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

disambiguate frontend types: rename frontend Request to MetricsQueryRequest #7737

Conversation

francoposa
Copy link
Member

@francoposa francoposa commented Mar 26, 2024

What this PR does

purely renaming

With the Prometheus codec completion work, we recently added the LabelsQueryRequest type, where previously the codec only had the Request type, which is only intended to represent Range and Instant query requests.

There are more similar types on the way as well (Examplars, Cardinality) & we need to disambiguate.

Which issue(s) this PR fixes or relates to

Fixes #

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

@francoposa francoposa changed the title rename frontend Request and to MetricsQueryRequest disambiguate frontend types: rename frontend Request to MetricsQueryRequest Mar 26, 2024
@francoposa francoposa marked this pull request as ready for review March 26, 2024 21:17
@francoposa francoposa requested a review from a team as a code owner March 26, 2024 21:17
Copy link
Contributor

@johannaratliff johannaratliff left a comment

Choose a reason for hiding this comment

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

The initial change to MetricsQueryHandler makes sense for clarity. The QueryBlockerMiddleware and MetricsQueryRequest on top of it feel a little long and java-esque in naming but not enough so that I have a problem with it.

@francoposa
Copy link
Member Author

The initial change to MetricsQueryHandler makes sense for clarity. The QueryBlockerMiddleware and MetricsQueryRequest on top of it feel a little long and java-esque in naming but not enough so that I have a problem with it.

We may just drop the Request suffix off the MetricsQueryRequest, LabelsQueryRequest and similar types if we think it's too noisy eventually.
Kept all the func parameters named just req or request to keep it simple and since we're only ever dealing with one of the types in a given func for now.

@francoposa francoposa merged commit 91c8317 into main Mar 26, 2024
29 checks passed
@francoposa francoposa deleted the francoposa/query-frontend-prometheus-codec-rename-request-to-metricsqueryrequest branch March 26, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants