diff --git a/CHANGELOG.md b/CHANGELOG.md index ef92c49ce3..60ebed5d86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#7244](https://github.com/thanos-io/thanos/pull/7244) Query: Fix Internal Server Error unknown targetHealth: "unknown" when trying to open the targets page. - [#7248](https://github.com/thanos-io/thanos/pull/7248) Receive: Fix RemoteWriteAsync was sequentially executed causing high latency in the ingestion path. - [#7271](https://github.com/thanos-io/thanos/pull/7271) Query: fixing dedup iterator when working on mixed sample types. +- [#7289](https://github.com/thanos-io/thanos/pull/7289) Query Frontend: show warnings from downstream queries. ### Added diff --git a/internal/cortex/querier/queryrange/query_range.go b/internal/cortex/querier/queryrange/query_range.go index afc1597f31..7c8b201a0d 100644 --- a/internal/cortex/querier/queryrange/query_range.go +++ b/internal/cortex/querier/queryrange/query_range.go @@ -273,6 +273,7 @@ func (prometheusCodec) MergeResponse(_ Request, responses ...Response) (Response var ( analyzes = make([]*Analysis, 0, len(responses)) + seriesStatsCounters = make([]*SeriesStatsCounter, 0, len(responses)) warnings []string = nil ) for i := range promResponses { @@ -282,15 +283,9 @@ func (prometheusCodec) MergeResponse(_ Request, responses ...Response) (Response if len(promResponses[i].Warnings) > 0 { warnings = append(warnings, promResponses[i].Warnings...) } - } - - seriesStatsCounters := make([]*SeriesStatsCounter, 0, len(responses)) - for i := range promResponses { - if promResponses[i].Data.GetSeriesStatsCounter() == nil { - continue - } - - seriesStatsCounters = append(seriesStatsCounters, promResponses[i].Data.GetSeriesStatsCounter()) + if promResponses[i].Data.GetSeriesStatsCounter() != nil { + seriesStatsCounters = append(seriesStatsCounters, promResponses[i].Data.GetSeriesStatsCounter()) + } } response := PrometheusResponse{