Skip to content

Commit

Permalink
Cut final release for v0.32.0 (#6634)
Browse files Browse the repository at this point in the history
* queryfrontend: fix explanation with query_range (#6633)

Signed-off-by: Saswata Mukherjee <[email protected]>

* Cut final release candidate for v0.32.0

Signed-off-by: Saswata Mukherjee <[email protected]>

---------

Signed-off-by: Saswata Mukherjee <[email protected]>
Co-authored-by: Giedrius Statkevičius <[email protected]>
  • Loading branch information
saswatamcode and GiedriusS authored Aug 23, 2023
1 parent 0ea99ac commit 041eb41
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re

### Removed

## [v0.32.0-rc.1](https://github.com/thanos-io/thanos/tree/release-v0.32.0-rc.1) - 16.08.2023
## [v0.32.0](https://github.com/thanos-io/thanos/tree/release-v0.32.0) - 23.08.2023

### Added

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.32.0-rc.1
0.32.0
19 changes: 11 additions & 8 deletions internal/cortex/querier/queryrange/results_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ func (PrometheusResponseExtractor) Extract(start, end int64, from Response) Resp
return &PrometheusResponse{
Status: StatusSuccess,
Data: PrometheusData{
ResultType: promRes.Data.ResultType,
Result: extractMatrix(start, end, promRes.Data.Result),
Stats: extractStats(start, end, promRes.Data.Stats),
ResultType: promRes.Data.ResultType,
Result: extractMatrix(start, end, promRes.Data.Result),
Stats: extractStats(start, end, promRes.Data.Stats),
Explanation: promRes.Data.Explanation,
},
Headers: promRes.Headers,
}
Expand All @@ -109,9 +110,10 @@ func (PrometheusResponseExtractor) ResponseWithoutHeaders(resp Response) Respons
return &PrometheusResponse{
Status: StatusSuccess,
Data: PrometheusData{
ResultType: promRes.Data.ResultType,
Result: promRes.Data.Result,
Stats: promRes.Data.Stats,
ResultType: promRes.Data.ResultType,
Result: promRes.Data.Result,
Stats: promRes.Data.Stats,
Explanation: promRes.Data.Explanation,
},
}
}
Expand All @@ -122,8 +124,9 @@ func (PrometheusResponseExtractor) ResponseWithoutStats(resp Response) Response
return &PrometheusResponse{
Status: StatusSuccess,
Data: PrometheusData{
ResultType: promRes.Data.ResultType,
Result: promRes.Data.Result,
ResultType: promRes.Data.ResultType,
Result: promRes.Data.Result,
Explanation: promRes.Data.Explanation,
},
Headers: promRes.Headers,
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/queryfrontend/queryinstant_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (c queryInstantCodec) DecodeRequest(_ context.Context, r *http.Request, for

result.Query = r.FormValue("query")
result.Path = r.URL.Path
result.Explain = r.FormValue("explain")
result.Explain = r.FormValue(queryv1.QueryExplainParam)
result.Engine = r.FormValue("engine")

for _, header := range forwardHeaders {
Expand Down
7 changes: 4 additions & 3 deletions test/e2e/query_frontend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ func TestQFEEngineExplanation(t *testing.T) {
explanation := rangeQuery(t, ctx, queryFrontend.Endpoint("http"), e2ethanos.QueryUpWithoutInstance,
timestamp.FromTime(now.Add(-5*time.Minute)),
timestamp.FromTime(now), 1, promclient.QueryOptions{
Explain: true,
Engine: "thanos",
Explain: true,
Engine: "thanos",
Deduplicate: true,
}, func(res model.Matrix) error {
if res.Len() == 0 {
return fmt.Errorf("expected results")
Expand Down Expand Up @@ -121,7 +122,7 @@ func TestQFEEngineExplanation(t *testing.T) {

t.Run("explanation works with instant query", func(t *testing.T) {
_, explanation := instantQuery(t, ctx, queryFrontend.Endpoint("http"), e2ethanos.QueryUpWithoutInstance, time.Now, promclient.QueryOptions{
Deduplicate: false,
Deduplicate: true,
Engine: "thanos",
Explain: true,
}, 1)
Expand Down

0 comments on commit 041eb41

Please sign in to comment.