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

Mimir query engine: finish reorganisation started in #8230 #8247

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

charleskorn
Copy link
Contributor

@charleskorn charleskorn commented Jun 3, 2024

What this PR does

This PR completes the reorganisation started in #8230.

In particular:

  • The Operator interfaces and RingBuffer type have moved to the types package
  • The operator package has been renamed to operators

This structure avoids circular dependencies between packages while allowing the pooling types to live in the pooling package, which allows us to protect the underlying pools from direct access.

I don't love the package name types, open to other suggestions.

Which issue(s) this PR fixes or relates to

#8230

Checklist

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

@charleskorn charleskorn marked this pull request as ready for review June 3, 2024 06:10
@charleskorn charleskorn requested a review from a team as a code owner June 3, 2024 06:10
Copy link
Contributor

@jhesketh jhesketh left a comment

Choose a reason for hiding this comment

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

nice work, lgtm.

Re the types package, we could have a buffer package and then move the operator+data into streamingpromql?
Either that, or keep operator in the operators package, as I think that makes sense still.

@charleskorn
Copy link
Contributor Author

Re the types package, we could have a buffer package and then move the operator+data into streamingpromql?

The data structures (eg. InstantVectorSeriesData) are the problematic ones - they're used both by the streamingpromql package and the operators package, so they either have to live in the operators package, or a third package. Otherwise, we'll create a circular dependency.

@charleskorn
Copy link
Contributor Author

Given the approval, I'm going to merge - we can always change the name or organisation again if we think of a better way to do it.

@charleskorn charleskorn merged commit 006ee9c into main Jun 4, 2024
29 checks passed
@charleskorn charleskorn deleted the charleskorn/follow-up-refactoring branch June 4, 2024 02:27
narqo pushed a commit to narqo/grafana-mimir that referenced this pull request Jun 6, 2024
…afana#8247)

* Move interface definitions to `types` package

* Move operators to `operators` package

* Add changelog entry
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