17019 Commits

Author SHA1 Message Date
Matthieu MOREL
addc3dcb47 chore: enable staticcheck linter and update golangci-lint to 2.10.1
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-18 15:58:16 +00:00
Linas Medziunas
38a7befa14 Add test case with join
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-02-18 15:49:23 +02:00
Linas Medziunas
c753252028 Update/fix test comments
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-02-18 15:38:27 +02:00
Julien
ece9437624
Merge pull request #18101 from roidelapluie/roidelapluie/wgGo
chore(lint): enable wg.Go
2026-02-17 15:48:11 +01:00
Julien Pivotto
7d0a39ac93 chore(lint): enable wg.Go
Since our minimum supported go version is now go 1.25, we can use wg.Go.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-02-17 15:21:51 +01:00
Linas Medziunas
a448a5cfbf Use matching.Card == parser.CardOneToOne for slice selection
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-02-17 13:55:34 +02:00
Bryan Boreham
f11e1c9fe1
Merge pull request #17476 from sammyqtran/web-test-speedup
test(web): Wait for server ready instead of sleeping 5 seconds.
2026-02-17 11:34:48 +00:00
Bartlomiej Plotka
1e2529f8d6
Merge pull request #18084 from veeceey/fix/issue-16645-otlp-too-old-sample
fix: handle ErrTooOldSample as 400 in OTLP and v2 histogram write paths
2026-02-17 09:11:18 +00:00
Bartlomiej Plotka
e4c997c126
Merge pull request #18085 from aknuds1/arve/fix-test-block-ranges
tsdb: fix flaky TestBlockRanges by using explicit compaction
2026-02-17 09:08:38 +00:00
Kyle Eckhart
ae062151cd
tsdb/wlog: Remove any temproary checkpoints when creating a Checkpoint (#17598)
* RemoveTmpDirs function to tsdbutil
* Refactor db to use RemoveTmpDirs and no longer cleanup checkpoint tmp dirs
* Use RemoveTmpDirs in wlog checkpoint to cleanup all checkpoint tmp folders
* Add tests for RemoveTmpDirs
* Ensure db.Open will still cleanup extra temporary checkpoints

Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
2026-02-17 09:23:54 +01:00
Bryan Boreham
b908cc48a2
Merge pull request #18069 from mishraa-G/optimize-label-api
tsdb:Optimize LabelValues API performance (#14551)
2026-02-16 21:51:40 +00:00
Martin Valiente Ainz
78020ad60e
promtool: fix --enable-feature flags ignored in check config and test rules (#18097)
Both are regressions from the parser refactoring in #17977.

- Fixes #18092
- Fixes #18093

Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com>
2026-02-16 15:38:26 +01:00
George Krajcsovits
f230a3ad0e
Move krajorama to general maintainer (#18095)
He's been participating in the bug scrub for a year and provides
reviews all over the code base. Also fix name spelling.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-02-16 10:53:05 +00:00
Arve Knudsen
3d2647dc6f
rules: fix flaky TestAsyncRuleEvaluation on Windows (#17965)
Convert all timing-sensitive subtests of TestAsyncRuleEvaluation to use
synctest for deterministic testing. This fixes flakiness on Windows
caused by timer granularity and scheduling variance.

The timing assertions are preserved using synctest's fake time, which
allows accurate verification of sequential vs concurrent execution
timing without relying on wall-clock time.

Fixes #17961

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-02-16 10:30:46 +01:00
Arve Knudsen
b0718d5c93 tsdb: fix flaky TestBlockRanges by using explicit compaction
Replace polling loops (for range 100 { time.Sleep }) with explicit
db.Compact() calls after disabling background compaction, eliminating
CI flakiness on slow machines. Also fix incorrect overlap assertions
that were checking the wrong direction (LessOrEqual -> GreaterOrEqual).

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-02-15 11:44:23 +01:00
Arve Knudsen
4fb6ce4d9a
fix: prevent stale exemplars leaking to histogram _sum/_count across data points (#18056)
In addHistogramDataPoints, exemplars assigned to the +Inf bucket of one
data point were carried over into the _sum and _count Append calls of
the next data point via the shared appOpts. Clear appOpts.Exemplars at
the start of each loop iteration to restore the nil-exemplar semantics
that existed before the AppenderV2 migration.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-02-15 10:47:38 +01:00
Varun Chawla
e72bc1381c fix: handle ErrTooOldSample as 400 Bad Request in OTLP and v2 histogram write paths
The OTLP write handler and the PRW v2 histogram append path were missing
ErrTooOldSample from their error type checks, causing these errors to
fall through to the default case and return HTTP 500 Internal Server Error.
This triggered unnecessary retries in OTLP clients like the Python SDK.

The PRW v1 write handler (line 115) and the PRW v2 sample append path
(line 377) already correctly handle ErrTooOldSample as a 400, and this
change makes the remaining paths consistent.

Also adds ErrTooOldSample to the v1 sample/histogram log checks so
these errors are properly logged instead of silently returned.

Fixes #16645

Signed-off-by: Varun Chawla <varun_6april@hotmail.com>
2026-02-14 02:49:49 -08:00
Divyansh Mishra
fcb68060cb tsdb: Optimize LabelValues for sparse intersections (Fixes #14551)
Signed-off-by: Divyansh Mishra <divyanshmishra@Divyanshs-MacBook-Air-3.local>
2026-02-14 15:18:54 +05:30
zenador
8937cbd395
promql: info function: support multiple name matchers (#17968)
* Add new test cases for multiple name matchers in PromQL info function
* Fix handling of multiple name matchers in PromQL info function

---------

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2026-02-13 17:22:58 +01:00
Linas Medziunas
86248a5ceb Fix for nhcb +Inf bucket
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-02-13 16:43:25 +02:00
Linas Medziunas
c657e859e3 Fix for nhcb [-Inf; -x) bucket
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-02-13 16:21:12 +02:00
Linas Medziunas
9a6c170d15 Fix midpoint of NHCB 1st bucket
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-02-13 15:39:42 +02:00
Linas Medziunas
538ad96136 Don't use extra digits in expected float values
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-02-13 15:39:27 +02:00
Julien
23e817663a
Merge pull request #18072 from DanCech/bench-fix
testing: enable experimental functions in promql benchmarks
2026-02-13 11:32:02 +01:00
hridyesh bisht
b64d56cbf3
Fix a couple of broken links in configuration.md (#18045)
Signed-off-by: kakabisht <kakabisht07@gmail.com>
2026-02-13 11:15:37 +01:00
Dan Cech
32922edd7b
enable experimental functions in promql benchmarks
Signed-off-by: Dan Cech <dcech@grafana.com>
2026-02-12 18:40:14 -05:00
Björn Rabenstein
a9c65f71b1
Merge pull request #18070 from prometheus/beorn7/maintainers
Remove special native histogram line from MAINTAINERS.md
2026-02-12 18:42:58 +01:00
beorn7
df3c358a66 Remove special native histogram line from MAINTAINERS.md
With native histograms being a stable feature, we should get rid of
this special line, which isn't really mapping maintainership to a
subtree, but to something that is all over the codebase.

Additionally, @beorn7 will soon retire from the project, so we needed
to remove him from this file anyway.

Signed-off-by: beorn7 <beorn@grafana.com>
2026-02-12 12:52:22 +01:00
Julien
19fd0b0b1d
Merge pull request #18063 from roidelapluie/roidelapluie/actuallyold
chore: Check that previous go version check actually uses previous go version
2026-02-11 16:32:43 +01:00
Julien Pivotto
3f25a53e20 chore: Check that previous go version check actually uses previous go version
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-02-11 16:05:50 +01:00
Julien
a78d7c35f5
Merge pull request #18061 from prometheus/superq/enforce_go_mod_version
Add CI check for Go version support
2026-02-11 15:55:11 +01:00
SuperQ
d8e9ed3246
Add CI check for Go version support
Fail Go mod check if the `go` directive in `go.mod` is newer than
the currently supported Go versions.

Signed-off-by: SuperQ <superq@gmail.com>
2026-02-11 13:36:27 +01:00
Björn Rabenstein
b84d7dcc56
Merge pull request #18058 from zenador/fix-avg-over-time-nh
promql: fix avg_over_time for single native histogram
2026-02-11 12:42:27 +01:00
Julien
7d40cd47e2
Merge pull request #17977 from tinitiuset/tinitiuset/parser-configuration
PromQL: Refactor parser to use instance configuration instead of global flags
2026-02-11 11:48:46 +01:00
Martin Valiente Ainz
eb5a0e1eed
Refactor parse.go into an instance-based Parser interface
Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com>
2026-02-11 11:21:49 +01:00
Martin Valiente Ainz
539936c861
Replace per-component parser options with default instance
Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com>
2026-02-11 11:16:04 +01:00
Martin Valiente Ainz
199d85d5e4
Add parser options parameter to remaining parse functions
Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com>
2026-02-11 11:16:04 +01:00
Martin Valiente Ainz
af16f35ad6
PromQL: Refactor parser to use instance configuration instead of global flags
Parser configuration is now per-engine/API/loader and no longer uses package-level flags, so behavior is consistent and tests don't rely on save/restore of global variables.

Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com>
2026-02-11 11:16:04 +01:00
renovate[bot]
edb6731d92
chore(deps): update actions/setup-go action to v6.2.0 (#18055)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 09:13:35 +01:00
renovate[bot]
60d365f4c9
chore(deps): update actions/cache action to v5.0.3 (#18053)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 09:13:27 +01:00
renovate[bot]
7c39446837
chore(deps): update actions/checkout action to v4.3.1 (#18054)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 09:13:16 +01:00
Joe Adams
68df59ba0c
Merge pull request #18029 from matt-gp/ecs-sd-bug-17920
AWS SD: ECS Discover Standalone Tasks
2026-02-10 22:03:28 -05:00
Ganesh Vernekar
873fdf2f0c
Merge pull request #18024 from prometheus/codesome/3-10-go-deps
Update Go dependencies for v3.10 release
2026-02-10 14:30:02 -08:00
Jeanette Tan
d2bb5605dc promql: Fix avg_over_time for single histogram
avg_over_time would produce +Inf count/sum and NaN zero bucket when
averaging a single histogram, because the count variable was initialized
to 0 instead of 1. This caused a division by zero at the end of the
function.

The float version of avg_over_time already correctly initializes count
to 1, this change makes the histogram version consistent with that.

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2026-02-11 05:06:53 +08:00
Jeanette Tan
9fddb70b8c promql: Add test case for avg_over_time single histogram fix
Add regression test for the bug where avg_over_time with a single
histogram sample would produce +Inf count/sum and NaN zero bucket
due to division by zero. The test verifies that both regular
exponential histograms and native histograms with custom buckets
(NHCB) correctly return the histogram unchanged when averaging
a single sample.

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2026-02-11 05:06:53 +08:00
Ganesh Vernekar
0ede19e2ee Replace deprecated google.CredentialsFromJSON with option.WithAuthCredentialsFile
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
2026-02-10 13:03:14 -08:00
Ganesh Vernekar
847e474bf4 Kubernetes SD: Disable WatchListClient in tests
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
2026-02-10 12:39:34 -08:00
Ganesh Vernekar
1698aada1e Update Go dependencies for v3.10 release
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
2026-02-10 12:39:33 -08:00
Ganesh Vernekar
43eaaf55a4
Merge pull request #18025 from prometheus/codesome/3-10-npm-deps
Update npm dependencies for v3.10
2026-02-10 12:31:39 -08:00
Bryan Boreham
c096bb0ff0
Merge pull request #18057 from pr00se/symbol-table-too-large-errors
tsdb/index: export sentinel error for symbol table size exceeded
2026-02-10 18:58:34 +00:00