Skip to content

Commit

Permalink
Nit
Browse files Browse the repository at this point in the history
  • Loading branch information
justinjung04 committed Jan 24, 2025
1 parent a92e069 commit f5d2216
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/querier/tripperware/queryrange/results_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"flag"
"fmt"
"net/http"
"slices"
"sort"
"strings"
"time"
Expand Down Expand Up @@ -297,12 +298,7 @@ func (s resultsCache) shouldCacheResponse(ctx context.Context, req tripperware.R
return false
}
if res, ok := r.(*tripperware.PrometheusResponse); ok {
partialDataErr := partialdata.ErrPartialData
for _, warning := range res.Warnings {
if warning == partialDataErr.Error() {
return false
}
}
return !slices.Contains(res.Warnings, partialdata.ErrPartialData.Error())
}

return true
Expand Down

0 comments on commit f5d2216

Please sign in to comment.