Julien
ff144f16fb
Merge pull request #18531 from roidelapluie/roidelapluie/smoothed-vector-binop
...
promql: fix smoothSeries() @ modifier timestamp mismatch
2026-04-17 17:05:50 +02:00
Julien
4c50ef989d
Update promql/promqltest/testdata/extended_vectors.test
...
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com >
Signed-off-by: Julien <291750+roidelapluie@users.noreply.github.com >
2026-04-17 16:38:36 +02:00
Julien
5d0bc055ef
Merge pull request #17877 from roidelapluie/roidelapluie/funcs
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests for Prometheus upgrades and downgrades (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
PromQL: Add start() end() range() and step() functions
2026-04-17 13:51:37 +02:00
Julien Pivotto
85dbc3cc76
promql: fix smoothSeries() @ modifier timestamp mismatch
...
smoothSeries() was stamping output points at offset-adjusted timestamps
instead of evaluator timestamps. When the @ modifier is used, this
causes gatherVector() to miss the points because it matches by exact
timestamp equality against evaluator step timestamps.
Fix by iterating over evaluator timestamps and deriving data timestamps
by subtracting the offset, so output points align with what
gatherVector() expects.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-04-16 13:44:58 +02:00
Julien Pivotto
ae9e52c868
PromQL: Add start() end() range() and step() functions
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-04-16 10:59:23 +02:00
Julien Pivotto
93ec767fed
promql: fix smoothed rate returning zero for data only after range
...
For smoothed rate/increase, a result should only be returned
when there is data available to interpolate across the range. If the
range has a single data point only on one side, the result is
meaningless and should be empty.
The "data only before" case was already handled: if the last fetched
sample is at or before rangeStart, extendedRate returns nothing.
Add the symmetric guard for the "data only after" case: if the first
fetched sample is strictly after rangeEnd, return nothing as well.
This mirrors the behaviour described in prometheus/prometheus#18295 ,
where a smoothed rate that has no data before the range should not
return zero.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-04-16 09:34:16 +02:00
George Krajcsovits
971e64756e
Merge pull request #18498 from ldufr/revive-emit-warning-when-sort-is-used-range
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests for Prometheus upgrades and downgrades (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
annotations: add warning for ineffective sort in range queries
2026-04-10 11:17:52 +02:00
George Krajcsovits
31b40c75b0
Apply suggestion from @krajorama
...
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com >
2026-04-10 10:13:38 +02:00
Matthieu MOREL
44d617c671
build: update golangci-lint version to v2.11.4 ( #18480 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests for Prometheus upgrades and downgrades (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
fix(promql/parser): improve Pretty method for Expressions to handle empty cases
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2026-04-10 07:20:15 +02:00
Laurent Dufresne
e100520467
annotations: add warning for ineffective sort in range queries
...
Co-authored-by: Bojun Kim <bojun.kim@deliveryhero.com >
Co-authored-by: Laurent Dufresne <laurent.dufresne@grafana.com >
Signed-off-by: Laurent Dufresne <laurent.dufresne@grafana.com >
2026-04-09 15:21:11 +02:00
Julien
e4d966771a
Merge pull request #18475 from roidelapluie/roidelapluie/fuzzing-dict-fuzzparseexpr
...
fuzzing: generate libFuzzer dictionary for FuzzParseExpr
2026-04-09 09:54:12 +02:00
Arve Knudsen
56c6370b26
promql: fix info() handling of negated __name__ matchers ( #17932 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests for Prometheus upgrades and downgrades (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
* promql: fix info() handling of negated __name__ matchers
---------
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2026-04-08 16:01:27 +00:00
Arve Knudsen
497b8182b7
promql: add info() test cases and remove stale XXX comment ( #18354 )
...
* promql: add test for info() with non-matching labels and empty-string data matcher
This adds a test case for info() where identifying labels don't match
any info series, but the data label matcher accepts empty strings
({data=~".*"}). In this case, the base series should be returned
unchanged, since the matcher doesn't require info series data to be
present.
This complements the existing test with {non_existent=~".+"}, which
drops the series because .+ doesn't match the empty string.
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* promql: remove stale XXX comment and add info() empty-matcher test
Remove the outdated XXX comment about vector selectors requiring at
least one non-empty matcher, since the info function's second argument
now bypasses this check via BypassEmptyMatcherCheck.
Add a test case for info(metric, {non_existent=~".*"}) to verify that
a data matcher accepting empty labels on its own returns the metric
unchanged when the requested label doesn't exist on the info series.
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* promql: add test for info() with non-matching identifying labels and non-empty data matcher
Add a test case for info(metric_not_matching_target_info, {data=~".+"})
to verify that the series is dropped when identifying labels don't match
any info series and the data matcher doesn't accept empty strings.
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
---------
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2026-04-08 17:56:35 +02:00
Julien Pivotto
efe305b898
fuzzing: generate libFuzzer dictionary for FuzzParseExpr
...
Export parser.Keywords() and add GetDictForFuzzParseExpr() so that
the corpus generator can produce a stable fuzzParseExpr.dict file
derived directly from the PromQL grammar rather than maintained by hand.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-04-08 17:38:23 +02:00
George Krajcsovits
e0cbfbe1b2
promqltest: support start timestamp (ST) per sample in load command ( #18360 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests for Prometheus upgrades and downgrades (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
* promqltest: use AppenderV2 in load command
Switch the PromQL test framework's load command from storage.Appender
to storage.AppenderV2 in appendSample, appendCustomHistogram and
appendTill. ST is set to 0 (unknown) for now; a follow-up will add
per-sample ST specification in load statements.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* promqltest: fix unchecked Rollback error
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* promqltest: support start timestamp (ST) per sample in load command
Add @st annotation lines in the load section of PromQL test files to
specify a start timestamp offset for each sample. The @st line must
immediately precede the corresponding sample line. The metric selector
is the same as the sample line, followed by @st and a space, then an
ST sequence.
ST offset items use Prometheus duration syntax (e.g. -1m, 30s) and
support the same repetition shorthand as value sequences:
_ – omit ST for this position (ST=0 in AppenderV2)
_xN – N omitted positions
<dur> – one position with the given offset
<dur>xN – N+1 positions all with the same offset
<dur>+<dur>xN – N+1 positions, offset increasing by step each position
<dur>-<dur>xN – N+1 positions, offset decreasing by step each position
The absolute ST stored in each sample is:
sample_timestamp_ms + offset_ms
The count of ST values must exactly match the count of sample values.
No @st line means ST=0 for all samples (backward compatible).
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* promqltest: use labels.Equal for @st metric match check
Using hash comparison risks false positives on hash collisions.
Compare metrics directly with labels.Equal instead.
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* promqltest: add storage roundtrip test for @st lines
Verify that start timestamps written via the @st load syntax are
actually persisted in TSDB and can be read back through the chunkenc
Iterator.AtST method. Requires both EnableSTStorage (WAL encoding) and
EnableXOR2Encoding (XOR2 chunk format) to be enabled.
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* promqltest: enable ST storage and XOR2 encoding for built-in tests
Enable both EnableSTStorage and EnableXOR2Encoding in the default test
storage used by RunBuiltinTests and RunTest. This ensures the *.test
testdata files run against a storage that can persist and retrieve start
timestamps, matching real Prometheus deployment behaviour.
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* promqltest: use newTestStorage in ST roundtrip test
Reuse newTestStorage instead of constructing a separate teststorage
instance with explicit options. This keeps the roundtrip test consistent
with the rest of the test suite and removes redundant imports.
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* promqltest: scope ST/XOR2 storage options to package-internal tests
newTestStorage was enabling ST storage and XOR2 encoding globally,
which broke unrelated tests (e.g. TestStreamReadEndpoint) in other
packages that call RunBuiltinTests.
Instead, keep newTestStorage as a simple teststorage.New wrapper and
introduce a testStorageOptions package variable. An init() in the
internal test file sets it to enable ST and XOR2, so the options only
apply when the promqltest package itself is under test.
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* apply review comments
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
---------
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com >
2026-04-02 17:10:27 +02:00
Vamsi Mathala
3d6d1cf056
fix(PromQL): preserve DropName flag from subquery in last_over_time ( #18409 )
...
When last_over_time or first_over_time is applied to a subquery that
contains functions like abs(), round(), etc., the DropName flag should
be preserved. Previously, the flag was unconditionally overwritten based
solely on the function name, ignoring the input series state.
This fix checks if the input series (from a subquery) already has
DropName=true and respects that flag by using OR logic.
Before this fix:
last_over_time(abs(metric)[10m:]) incorrectly returned {__name__="metric", ...}
After this fix:
last_over_time(abs(metric)[10m:]) correctly returns {...} without __name__
The same behavior applies to first_over_time().
Fixes #18397
---------
Signed-off-by: Vamsi Mathala <vmathala@redhat.com >
2026-03-31 15:39:42 +02:00
Arve Knudsen
d6c18a4d62
promql: add test and docs for info() behavior when info series goes stale ( #18352 )
...
* promql: add test for info() with data label matcher when info series goes stale
When info() is called with a data label matcher that doesn't match
the empty string (e.g. {data=~".+"}), samples at timestamps where
no info series is available should be dropped rather than falling
back to the original un-enriched series.
This case was missing from the test suite.
* docs: document info() behavior when info series is unavailable
Document that when no matching info series exists at a timestamp,
data label matchers that don't match the empty string cause the
sample to be dropped, while empty-matching matchers or no selector
return the series unenriched.
* promql: add test cases for info() fallback when info series goes stale
Add test cases for info(metric, {data=~".*"}) and info(metric) to
complement the existing info(metric, {data=~".+"}) test case, making
the behavioral contrast explicit: empty-matching matchers and no
selector fall back to the unenriched series, while non-empty-matching
matchers drop the sample.
---------
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2026-03-30 09:32:29 +02:00
Arve Knudsen
841e4a96b1
promql: add more info() test cases ( #18367 )
...
Add test cases for two edge cases in the info() function:
- Enrichment when inner series are missing one identifying label
- Conflicting labels across different info metrics should error
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2026-03-26 17:08:28 +01:00
George Krajcsovits
1ec24a3295
promqltest: use AppenderV2 in load command ( #18359 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
* promqltest: use AppenderV2 in load command
Switch the PromQL test framework's load command from storage.Appender
to storage.AppenderV2 in appendSample, appendCustomHistogram and
appendTill. ST is set to 0 (unknown) for now; a follow-up will add
per-sample ST specification in load statements.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* promqltest: fix unchecked Rollback error
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
---------
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
2026-03-25 11:09:41 +01:00
George Krajcsovits
9670de1c35
Revert "annotations: add warning for ineffective sort in range queries ( #16628 )" ( #18357 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
This reverts commit 3f80815e1b .
2026-03-24 16:33:38 +01:00
Bojun Kim
3f80815e1b
annotations: add warning for ineffective sort in range queries ( #16628 )
...
* feat(annotations): add warning for ineffective sort in range queries
Signed-off-by: poi1649 <bojun.kim@deliveryhero.com >
* feat(annotations): add Warning for sort_by_label and sort_by_label_desc as well
Signed-off-by: poi1649 <bojun.kim@deliveryhero.com >
* fix formatting
Signed-off-by: poi1649 <bojun.kim@deliveryhero.com >
* Apply suggestion from @poi1649
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
* Apply suggestion from @poi1649
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
* Update annotations.go
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
* Update annotations.go
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
* Update annotations.go
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
* adjust formatting
Signed-off-by: poi1649 <bojun.kim@deliveryhero.com >
---------
Signed-off-by: poi1649 <bojun.kim@deliveryhero.com >
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
2026-03-24 13:00:36 +01:00
György Krajcsovits
e58668eb29
test(promql): add more test nh cases for fraction and trim
...
To be complete, add an empty NHCB to the minimal case.
For trim, add tests on empty histograms and test that show that
for non empty histograms
histogram_fraction(-Inf, x, h) * histogram_count(h) == h </ x
histogram_fraction(x, +Inf, h) * histogram_count(h) == h >/ x
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
2026-03-12 11:18:41 +01:00
Bartlomiej Plotka
de56b4c528
Merge pull request #18263 from linasm/do-not-skip-buckets-if-trimming
...
fix(PromQL): do not skip histogram buckets when trimming
2026-03-10 12:37:57 +01:00
Linas Medziunas
5ba581748c
fix(PromQL): do not skip histogram buckets when trimming
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com >
2026-03-09 15:25:24 +02:00
Julien Pivotto
c2fc92e2f3
Fuzzing: Remove old go-fuzz infrastructure
...
After the migration to native Go fuzzing in PR #17393 , this removes
the old dvyukov/go-fuzz based infrastructure. This enables a smooth
transition, because we can merge this pull request when upstream
OSS-Fuzz changes have been done.
This removes:
- promql/fuzz.go and promql/fuzz_test.go (old fuzz functions)
- promql/fuzz-data/ (old corpus files)
The new fuzzing infrastructure is in util/fuzzing/ and is now used
by the CI workflow.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-03-04 09:41:21 +01:00
Matthieu MOREL
45b9329e68
chore: fix emptyStringTest issues from gocritic ( #18226 )
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2026-03-04 08:24:50 +01:00
Andrew Hall
3bda9a3396
promql: allow timestamp() to be wrapped as a step invariant depending on arguments ( #17313 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Some timestamp functions can be safely wrapped as a step invariant.
Then once we do that we never need to check or unwrap at evaluation time.
For instance; `timestamp(metric @ 1)` is step invariant, whereas
`timestamp(abs(metric @ 1))` is not.
Currently all `timestamp` `*parser.Call` are excluded from being
considered step invariant since it is listed in the
`AtModifierUnsafeFunctions` map.
This PR adds an extra check for timestamp functions which consider
the arguments, and if the argument is a simple VectorSelector then
the entire `*parser.Call` can be safely wrapped as a step invariant.
Signed-off-by: Andrew Hall <andrew.hall@grafana.com >
Co-authored-by: Bryan Boreham <bjboreham@gmail.com >
2026-03-02 12:01:14 +00:00
Julien
02b1abab5e
Merge pull request #18189 from ringerc/log-trace-id
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Add traceID to query logs
2026-02-26 17:06:48 +01:00
Bartlomiej Plotka
b53d7386d0
Merge pull request #17159 from linasm/optimize-join-performance-5
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
[PERF] PromQL: replace maps with slices and reuse matching data structures in VectorBinop/And/Or/Unless
2026-02-25 13:50:31 +00:00
Linas Medžiūnas
c317f9254e
chore(histogram): Move histogram trimming code out of engine.go ( #18185 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com >
2026-02-25 09:10:42 +01:00
Craig Ringer
d4b00499e8
Add traceID to query logs
...
The query log embeds a spanID, but omits the traceID, making
log/trace correlation significantly more difficult.
Add the trace ID as well.
This might be better done with the otelslog wrapper in
https://github.com/go-slog/otelslog but this change is more
minimal.
This does not add trace and span IDs to other logging
emitted to Prometheus's standard logger during the processing
of activities in which traces may be active.
Fixes #18188
Signed-off-by: Craig Ringer <craig.ringer@enterprisedb.com >
2026-02-25 12:24:11 +13:00
George Krajcsovits
5d3f9ee39b
Merge pull request #17904 from linasm/trim_histogram
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
promql: Implement </ and >/ operators for trimming native histograms
2026-02-24 17:16:24 +01:00
Björn Rabenstein
b2e63376da
Merge pull request #18105 from mmorel-35/staticcheck
...
chore: enable staticcheck linter and update golangci-lint to 2.10.1
2026-02-19 12:44:00 +01:00
Linas Medžiūnas
5bd0d00f8c
PromQL: Add experimental histogram_quantiles variadic function ( #17285 )
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com >
Signed-off-by: Björn Rabenstein <github@rabenste.in >
Signed-off-by: beorn7 <beorn@grafana.com >
Co-authored-by: Björn Rabenstein <github@rabenste.in >
Co-authored-by: beorn7 <beorn@grafana.com >
2026-02-18 17:32:29 +01:00
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 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
zenador
8937cbd395
promql: info function: support multiple name matchers ( #17968 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
* 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
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
b84d7dcc56
Merge pull request #18058 from zenador/fix-avg-over-time-nh
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
promql: fix avg_over_time for single native histogram
2026-02-11 12:42:27 +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
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
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