Julien Pivotto
01637b47b0
Fix multi-arch support for distroless Docker image
...
The distroless Dockerfile was using a hardcoded SHA256 digest that
referenced only the amd64 image, preventing builds for other
architectures. This caused the main-distroless tag to only publish
amd64 images while the regular main tag had all 5 architectures.
Changes:
- Use architecture-specific image tags (nonroot-${DISTROLESS_ARCH})
instead of SHA256 digest to enable multi-arch manifest resolution
- Add DISTROLESS_ARCH build arg to handle architecture name mapping
(armv7 -> arm) between Prometheus and distroless conventions
- Move ARG declarations before FROM to support variable substitution
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-19 15:58:37 +01:00
Julien
716003851d
Merge pull request #17876 from roidelapluie/roidelapluie/distroless
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Add distroless Docker image variant
2026-01-19 15:09:59 +01:00
Julien Pivotto
1105c825cf
Add distroless Docker image variant
...
Introduces distroless image using UID/GID 65532 instead of nobody,
and removes VOLUME declaration. Busybox image remains default with
unchanged tags for backwards compatibility.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-19 14:39:59 +01:00
Arve Knudsen
572f247b4d
tsdb: add auto-cleanup to newTestHead and remove redundant cleanup calls ( #17890 )
...
Add automatic cleanup to newTestHeadWithOptions so that heads created
with newTestHead are automatically closed when the test ends. This
simplifies test code by removing the need for manual cleanup in most
cases.
Changes:
- Add t.Cleanup in newTestHeadWithOptions immediately after creating
the head, using _ = h.Close() to handle double-close gracefully
- Remove redundant t.Cleanup, defer, and explicit Close calls from
tests that use newTestHead
- Add cleanup for heads created with NewHead directly in restart
patterns (e.g., restartHeadAndVerifySeriesCounts, startHead)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-19 12:57:05 +01:00
Arve Knudsen
dd85d7ca97
tsdb: fix memory leaks in buffer pools ( #17879 )
...
* tsdb: fix memory leaks in buffer pools
Clear reference fields when returning buffers to pools to avoid
retaining data after the buffer is reused.
Affected pools:
- refSeriesPool: clear Labels
- histogramsPool: clear H pointer
- floatHistogramsPool: clear FH pointer
- metadataPool: clear Unit and Help strings
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Clear slices
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Clear metadata buffer
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
---------
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-19 11:14:31 +00:00
Bartlomiej Plotka
c4b0da94db
Merge pull request #17835 from prometheus/bwplotka/a2-storage-support
...
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 (push) Has been cancelled
CI / 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
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
feat(storage)[PART4b]: add AppenderV2 to the rest of storage.Storage implementations + mock exemplar fix
2026-01-16 13:04:14 +00:00
Julien
c7f92054fc
Merge pull request #17871 from roidelapluie/roidelapluie/fix-fuzzing-issues
...
fuzzing: fix artifact path and experimental parser flags
2026-01-16 12:54:31 +01:00
Julien Pivotto
66bb47ade6
fuzzing: fix artifact path and experimental parser flags
...
Fix two issues in fuzzing infrastructure:
- Correct artifact upload path from promql/testdata/fuzz to util/fuzzing/testdata/fuzz to match where Go stores crash artifacts
- Fix GetCorpusForFuzzParseExpr to preserve original parser flag values instead of always resetting them to false, which was disabling experimental features before actual fuzzing ran
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-16 12:07:16 +01:00
bwplotka
f61a83bcd6
fix: appenderV2 mock exemplar appendErr injection before appending it
...
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-01-16 10:47:00 +00:00
Arve Knudsen
4afa76d083
OTLP: label caching for OTLP-to-Prometheus conversion to reduce allocations and improve latency ( #17860 )
...
* otlptranslator: add label caching for OTLP-to-Prometheus conversion
Add per-request caching to reduce redundant computation and allocations
during OTLP metric conversion:
1. Per-request label sanitization cache: Cache sanitized label names
within a request to avoid repeated string allocations for commonly
repeated labels like __name__, job, instance.
2. Resource-level label caching: Precompute and cache job, instance,
promoted resource attributes, and external labels once per
ResourceMetrics boundary instead of for each datapoint.
3. Scope-level label caching: Precompute and cache scope metadata labels
(otel_scope_name, otel_scope_version, etc.) once per ScopeMetrics
boundary.
4. LabelNamer instance caching: Reuse the LabelNamer struct across
datapoints within the same resource context.
These optimizations significantly reduce allocations and improve latency
for OTLP ingestion workloads with many datapoints per resource/scope.
---------
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2026-01-16 10:30:05 +00:00
Julius Volz
ded3a8c309
UI: Fix broken Y axis after graph page reload ( #17869 )
...
* UI: Fix broken Y axis after graph page reload
The new `y_axis_min` setting was always encoded into the URL, even if its value
was `null` (in which case it would be set to an empty string parameter). On the
decoding side, this wasn't taken into account correctly, and we tried to parse
the empty string as a float, causing completely broken graphs showing nothing
after reloading the graph page with such URL parameters.
I'm doing two things now:
* For the future, only encode the Y axis min into the URL if it's set at all,
similar as we do for the `end_input` and `moment_input` fields.
* On the decoding side, accommodate people (at least for now) who already saved
some links with the empty `y_axis_min` parameter by treating an empty string
as `null` instead of a number.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Add URL state encoding/decoding tests
Signed-off-by: Julius Volz <julius.volz@gmail.com>
---------
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-16 09:50:39 +00:00
George Krajcsovits
ef350b2b54
Merge pull request #17840 from prometheus/krajo/st-in-chunks
...
feat(tsdb): new Append parameter and AtST interface for chunks
2026-01-16 10:32:53 +01:00
bwplotka
1d3c6210f3
add extra fanout test
...
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-01-15 14:13:58 +00:00
Arve Knudsen
a85a8998c9
otlptranslator: fix BenchmarkPrometheusConverter_FromMetrics ( #17866 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
The benchmark was passing appendMetadata=false to NewCombinedAppender,
which caused UpdateMetadata to never be called on the underlying
noOpAppender. This resulted in app.metadata always being 0, failing
the assertion that metadata count should be positive.
Fix by enabling metadata appending in the benchmark.
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-15 09:33:16 +01:00
Julius Hinze
e49d11c88d
tsdb: fix rare case of OOO exemplar insertion pointing to the exemplar being deleted ( #17865 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Signed-off-by: Julius Hinze <julius.hinze@grafana.com>
2026-01-15 08:49:37 +01:00
Julius Hinze
ccb7468b09
tsdb: fix grow/shrink nextIndex calculation ( #17863 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Signed-off-by: Julius Hinze <julius.hinze@grafana.com>
2026-01-14 16:44:50 +01:00
George Krajcsovits
06a59346fe
Update tsdb/chunkenc/chunk.go
...
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 (push) Has been cancelled
CI / 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 / 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
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
2026-01-14 16:41:03 +01:00
bwplotka
8a2921e385
addressed feedback
...
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-01-14 13:57:48 +00:00
bwplotka
49c3aea56d
feat(storage)[PART4b]: add AppenderV2 to the rest of storage.Storage impl
...
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-01-14 13:54:27 +00:00
Bartlomiej Plotka
3374d2e56f
feat(teststorage)[PART4a]: Add AppendableV2 support for mock Appendable ( #17834 )
...
* feat(teststorage)[PART4a]: Add AppendableV2 support for mock Appendable
Signed-off-by: bwplotka <bwplotka@gmail.com>
* fix: adjusted AppenderV1 flow for reliability
Found in https://github.com/prometheus/prometheus/pull/17838 and by
Krajo comment
Signed-off-by: bwplotka <bwplotka@gmail.com>
* addressed comments
Signed-off-by: bwplotka <bwplotka@gmail.com>
* fix broken appV2 commit and rollback; added tests
Signed-off-by: bwplotka <bwplotka@gmail.com>
---------
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-01-14 13:48:33 +00:00
György Krajcsovits
6137de085e
test ListSeriesIterator with ST
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:19 +01:00
György Krajcsovits
5ecc0e7062
test that ChainSampleIterator passes on the AtST call
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:18 +01:00
György Krajcsovits
8067b3d60a
add test coverage for buffer.go
...
I've checked that commenting out any one of the new lines produces an error.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:17 +01:00
György Krajcsovits
adf734db7a
update remaining tests
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:16 +01:00
György Krajcsovits
a5ac0bff1d
update ooo_head.go but only with TODOs
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:15 +01:00
György Krajcsovits
6647e512ad
update ExpandSamples
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:14 +01:00
György Krajcsovits
28dca34f4f
auto update head sample use in tests
...
find . -name "*.go" -type f -exec sed -E -i \
's/([^[:alpha:]]sample\{)([^,{:]+,[^,]+,[^,]+,[^,]+\})/\10, \2/g' {} +
I've omitted tsdb/ooo_head.go from the commit because I'm also adding todo
there.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:13 +01:00
György Krajcsovits
f616689f09
tsdb/head.go: add start timestamp to sample type used in tests
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:12 +01:00
György Krajcsovits
a00c0d6a66
auto update f/h/fh sample init with positional fields
...
find . -name "*.go" -type f \
-exec sed -E -i 's/((f|h|fh)Sample\{)([^,{:]+,[^,]+\})/\10, \3/g' {} +
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:11 +01:00
György Krajcsovits
1e77d9ded8
storage/buffer.go: add ST to sample types and iterators
...
Also fix the single multi line fSample definition to be one liner.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:10 +01:00
György Krajcsovits
70bc06718d
feat(tsdb): new AppenderV2 and AtST interface for chunks
...
No implementation yet. Just to test the shape of the interface.
AtST is implemented for trivial cases, anything else is hard coded
to return 0.
Ref: https://github.com/prometheus/prometheus/issues/17791
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:09 +01:00
Devarsh
c7bc56cf6c
Add scrape commit and total duration metrics ( #17665 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
* Add scrape commit and total duration metrics
Signed-off-by: Devarsh <devarshshah2608@gmail.com>
* update metric based on the review
Signed-off-by: Devarsh <devarshshah2608@gmail.com>
* conditionally record scrape duration
Signed-off-by: Devarsh <devarshshah2608@gmail.com>
* Fix formatting in scrape.go
Signed-off-by: Devarsh <devarshshah2608@gmail.com>
---------
Signed-off-by: Devarsh <devarshshah2608@gmail.com>
2026-01-13 14:07:27 -03:00
Ben Kochie
72a23934ad
Refactor various tsdb sub-packages ( #17847 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Migrate various tsdb related packages from `tsdb/errors` to the standard
library `errors` package.
Signed-off-by: SuperQ <superq@gmail.com>
2026-01-13 13:38:58 +00:00
Gregor Zeitlinger
f331aa6d14
fix typo in release notes about scrape_native_histograms ( #17655 )
...
* fix typo
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
* add changelog
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
* Update CHANGELOG.md
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
* remove migration notes again
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
---------
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2026-01-13 11:41:57 +01:00
Julien
6b0b93d2d3
Merge pull request #17393 from roidelapluie/roidelapluie/fuzzing
...
Fuzzing: Move to go fuzzing
2026-01-13 10:38:16 +01:00
Ben Kochie
836caf7b16
Refactor storage package errors ( #17846 )
...
Replace use of `tsdb/errors` with standard library `errors`.
Signed-off-by: SuperQ <superq@gmail.com>
2026-01-13 10:21:33 +01:00
Julien Pivotto
802e959ec2
chore(fuzzing): Meet required check expectation
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-13 10:02:58 +01:00
Ben Kochie
03a1d7a350
Refactor storage package errors ( #17844 )
...
Replace use of `tsdb/errors` with standard library `errors`.
Signed-off-by: SuperQ <superq@gmail.com>
2026-01-13 09:53:49 +01:00
Ben Kochie
d9ed026658
Refractor promtool errors ( #17842 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Replace use of `tsdb/errors` with standard library `errors`.
Signed-off-by: SuperQ <superq@gmail.com>
2026-01-13 06:35:11 +00:00
Arthur Silva Sens
c980c74f51
Update google/pprof to allow go 1.24.0 ( #17843 )
...
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2026-01-13 06:32:12 +00:00
Nick Pillitteri
a769a7eeb7
model/labels: fix regex with capture, wildcards, literal ( #17828 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
This change fixes an issue introduced in #17707 . When a regex
with a wildcard, literal, and final wildcard surounded by a
capture group was parsed - the capture group was not removed
first preventing `optimizeConcatRegex` from running.
Found via fuzz testing.
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
2026-01-12 15:51:45 +00:00
Julien Pivotto
de0a864b5c
Fuzzing: Move to go fuzzing
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-12 12:59:10 +01:00
Ganesh Vernekar
9cb3641ccd
Volunteer to shepherd the release v3.10 ( #17822 )
...
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 (push) Has been cancelled
CI / 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
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
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
2026-01-09 15:00:53 +00:00
Julien
f0eaf596fe
Merge pull request #17743 from RushabhMehta2005/optimization/extend-floats-prealloc
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
promql: preallocate slice in extendFloats optimization
2026-01-09 12:40:00 +01:00
Arve Knudsen
16703766f4
promql: fix info() returning empty when filtering by overlapping labels ( #17817 )
...
When filtering by a label that exists on both the input metric and
target_info (e.g., info(metric, {host_name="orbstack"}) where host_name
exists on both), the function incorrectly returned empty results.
The bug was in combineWithInfoVector: when no new labels were added
(because they all overlapped with base metric labels), the code entered
the "no match" filtering block even though an info series WAS matched.
The fix checks len(seenInfoMetrics) == 0 to correctly identify when no
info series matched. If an info series matched (seenInfoMetrics is
non-empty), the series is kept even if no new labels were added.
Fixes #17813
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-09 10:04:37 +01:00
Arthur Silva Sens
14de1eb043
Make service discoveries removable through build tags ( #17736 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Push README to Docker Hub / Push README to Docker Hub (push) Has been cancelled
Push README to Docker Hub / Push README to quay.io (push) Has been cancelled
* Make service discoveries removable through build tags
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Fix cross-platform build issues
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Change build tags used
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Remove year from License header
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Remove plugins automation
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Update README
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Update README.md
Co-authored-by: Julien <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
---------
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Julien <291750+roidelapluie@users.noreply.github.com>
2026-01-08 10:06:33 -03:00
Vilius Pranckaitis
6a81e4441e
promql: avoid unnecessary Metric.Get() calls in functions.go ( #17676 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Moved some Metric.Get() calls in PromQL functions to avoid unnecessary label extraction.
In many cases, this work was done to extract metric name, and was only used if annotations were emitted.
In the same go I also replaced labels.MetricName with model.MetricNameLabel, since the former was deprecated.
Signed-off-by: Vilius Pranckaitis <vpranckaitis@gmail.com>
2026-01-08 11:58:05 +00:00
Bryan Boreham
da254fd680
Merge pull request #17798 from prometheus/merge-3.9-into-main
...
Merge release-3.9 into main
2026-01-08 10:43:54 +00:00
Bryan Boreham
63b86fa851
Merge branch 'release-3.9' into merge-3.9-into-main
2026-01-08 10:22:01 +00:00
Charles Korn
a919e6d5ef
model/labels: improve performance of regex matchers like .*-.*-.* ( #17707 )
...
#14173 introduced an optimisation to better handle regex patterns like .*-.*-.*. It identifies strings the pattern cannot possibly match (because they do not contain all of the literal values) and returns false from MatchString early.
However, if the string does contain all literal values, then the Go regex engine is used to confirm that the string does match the pattern. But this is not necessary in the case where the start and end of the pattern is .* and everything in between is either a literal or .*: if the string contains all of the literals in order, then it matches the pattern, and invoking Go's regex engine to confirm this is unnecessary and quite slow.
* Add some more test cases
* Add benchmark, since existing benchmark doesn't show much impact given most of the random test strings will not match the patterns.
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2026-01-08 10:20:23 +00:00