Skip to content

Commit

Permalink
frontend: Add back split and cache to range middlewares
Browse files Browse the repository at this point in the history
It was removed here: #10742 by mistake

Also, change `TestMiddlewaresConsistency` so that we catch those
  • Loading branch information
julienduchesne committed Mar 4, 2025
1 parent aa846dc commit 313f2fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/frontend/querymiddleware/roundtrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ func newQueryMiddlewares(
log,
registerer,
)

queryRangeMiddleware = append(queryRangeMiddleware, newInstrumentMiddleware("split_by_interval_and_results_cache", metrics), splitAndCacheMiddleware)
}

queryInstantMiddleware = append(queryInstantMiddleware,
Expand Down
1 change: 1 addition & 0 deletions pkg/frontend/querymiddleware/roundtrip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ func TestMiddlewaresConsistency(t *testing.T) {
var allNames []string
for _, middlewares := range middlewaresByRequestType {
allNames = append(allNames, getMiddlewareNames(middlewares.instances)...)
allNames = append(allNames, middlewares.exceptions...)
}
slices.Sort(allNames)
allNames = slices.Compact(allNames)
Expand Down

0 comments on commit 313f2fd

Please sign in to comment.