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

QFE: fixing stats middleware when cache is enabled #8046

Merged

Conversation

pedro-stanaka
Copy link
Contributor

@pedro-stanaka pedro-stanaka commented Jan 8, 2025

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

Changes

  • There were some hidden flags in the caching middleware we had to set to avoid it interfering with the new middleware.

@pedro-stanaka pedro-stanaka force-pushed the fix/stats-middleware-caching branch from db1d9fe to 2a22435 Compare January 8, 2025 11:33
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Jan 8, 2025
@pedro-stanaka pedro-stanaka marked this pull request as ready for review January 8, 2025 11:35
Comment on lines 259 to 261
if err := cfg.QueryRangeConfig.ResultsCacheConfig.Validate(querier.Config{
EnablePerStepStats: cfg.QueryRangeConfig.ResultsCacheConfig.CacheQueryableSamplesStats,
}); err != nil {
Copy link
Contributor Author

@pedro-stanaka pedro-stanaka Jan 8, 2025

Choose a reason for hiding this comment

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

Had to do this because of validation of parameters in Cortex QFE code. They compare QFE config against Cortex Querier config. But we ignore/dont use that querier config, so I had to force that to pass validation. Or I can delete the validation piece, but then we will have to touch vendored code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can extract the config in a variable to make it a bit more readable, and add a short comment above it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. done

@saswatamcode saswatamcode enabled auto-merge (squash) January 15, 2025 10:17
@saswatamcode saswatamcode merged commit a3b78c2 into thanos-io:main Jan 15, 2025
22 checks passed
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