From 2c1f9558b26341c1842150dd235e0d01ef939b96 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Wed, 27 Mar 2024 19:00:16 +0100 Subject: [PATCH 1/3] promql: Fix histogram comparison in test framework The definition of histograms in the test framework may create histograms in a non-compact form. Since histogram comparison relies on exact equality of the bucket layout, we have to compact the histograms created by the test framework language before comparing them to histograms returned from the PromQL engine. Signed-off-by: beorn7 --- promql/test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/promql/test.go b/promql/test.go index 296b3d3ca..a7b5b8b99 100644 --- a/promql/test.go +++ b/promql/test.go @@ -563,7 +563,7 @@ func (ev *evalCmd) compareResult(result parser.Value) error { return fmt.Errorf("expected histogram value at index %v for %s to have timestamp %v, but it had timestamp %v (result has %s)", i, ev.metrics[hash], expected.T, actual.T, formatSeriesResult(s)) } - if !actual.H.Equals(expected.H) { + if !actual.H.Equals(expected.H.Compact(0)) { return fmt.Errorf("expected histogram value at index %v (t=%v) for %s to be %v, but got %v (result has %s)", i, actual.T, ev.metrics[hash], expected.H, actual.H, formatSeriesResult(s)) } } @@ -595,7 +595,7 @@ func (ev *evalCmd) compareResult(result parser.Value) error { if expH != nil && v.H == nil { return fmt.Errorf("expected histogram %s for %s but got float value %v", HistogramTestExpression(expH), v.Metric, v.F) } - if expH != nil && !expH.Equals(v.H) { + if expH != nil && !expH.Compact(0).Equals(v.H) { return fmt.Errorf("expected %v for %s but got %s", HistogramTestExpression(expH), v.Metric, HistogramTestExpression(v.H)) } if !almostEqual(exp0.Value, v.F, defaultEpsilon) { From 65b4696b88521197668c09dd08dd5e46777c6845 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Wed, 27 Mar 2024 19:02:27 +0100 Subject: [PATCH 2/3] promql: Remove leftover debug output Signed-off-by: beorn7 --- promql/test.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/promql/test.go b/promql/test.go index a7b5b8b99..ba716d1ee 100644 --- a/promql/test.go +++ b/promql/test.go @@ -606,10 +606,6 @@ func (ev *evalCmd) compareResult(result parser.Value) error { } for fp, expVals := range ev.expected { if !seen[fp] { - fmt.Println("vector result", len(val), ev.expr) - for _, ss := range val { - fmt.Println(" ", ss.Metric, ss.T, ss.F) - } return fmt.Errorf("expected metric %s with %v not found", ev.metrics[fp], expVals) } } From fc3ad66539a3fc371bcd640ea20bfe079309fd74 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Thu, 28 Mar 2024 18:33:39 +0100 Subject: [PATCH 3/3] Appoint release shepherds for v2.52 and v2.53 Note that we have delayed v2.52 by a week to avoid collisions with events and travels. Signed-off-by: beorn7 --- RELEASE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RELEASE.md b/RELEASE.md index c2f98ab2c..f313c4172 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -56,6 +56,8 @@ Release cadence of first pre-releases being cut is 6 weeks. | v2.49 | 2023-12-05 | Bartek Plotka (GitHub: @bwplotka) | | v2.50 | 2024-01-16 | Augustin Husson (GitHub: @nexucis) | | v2.51 | 2024-03-07 | Bryan Boreham (GitHub: @bboreham) | +| v2.52 | 2024-04-22 | Arthur Silva Sens (GitHub: @ArthurSens) | +| v2.53 | 2024-06-03 | George Krajcsovits (GitHub: @krajorama) | If you are interested in volunteering please create a pull request against the [prometheus/prometheus](https://github.com/prometheus/prometheus) repository and propose yourself for the release series of your choice.