Commit graph

17417 commits

Author SHA1 Message Date
Julius Volz
34cebfe953
Merge pull request #18411 from prometheus/self-metrics-api
Some checks failed
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 (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
Add API endpoint for getting Prometheus' metrics about itself
2026-04-15 14:47:38 +02:00
Julien
6e83b49dd6
Merge pull request #17685 from akshatsinha0/fix-aws-sd-setdirectory
Fix(discovery/aws): Added SetDirectory method to EC2SDConfig.
2026-04-15 14:35:46 +02:00
Julien
c6d2fa3596
Merge pull request #18519 from alliasgher/fix-testfstype-unknown-fs
util/runtime: let TestFsType tolerate filesystems absent from FsType map
2026-04-15 14:12:13 +02:00
alliasgher
ae063a499a util/runtime: simplify TestFsType comment per review
Remove issue reference and trim the comment down to the assertion's
intent, per @roidelapluie review.

Signed-off-by: alliasgher <alliasgher123@gmail.com>
2026-04-15 15:54:02 +05:00
Toni Cárdenas
2ad75b0ef0
util/strutil: remove duplicate isASCII declaration (#18522)
Some checks are pending
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 for Prometheus upgrades and downgrades (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 / Compliance testing (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: Toni Cárdenas <toni.cardenasvargas@grafana.com>
2026-04-14 16:46:11 +00:00
alliasgher
6994b4cb4e util/runtime: simplify TestFsType to check != 0 instead of _MAGIC
Signed-off-by: alliasgher <alliasgher123@gmail.com>
2026-04-14 20:26:13 +05:00
Arve Knudsen
98809e40c6
tsdb: Skip clean series during periodic head chunk mmap (#18272)
tsdb: Skip clean series during periodic head chunk mmap

The periodic mmapHeadChunks cycle previously acquired a per-series
lock on every series, even though typically >99% have nothing to
mmap. This was identified as a CPU bottleneck in Grafana Mimir.

Add a headChunkCount field (sync/atomic.Uint32) to memSeries that
tracks the number of head chunks. It is incremented in
cutNewHeadChunk and the histogram new-chunk paths, and reset by
mmapChunks and truncateChunksBefore. mmapHeadChunks uses a lock-free
Load to skip series with fewer than 2 head chunks, avoiding the
per-series lock for clean series.

sync/atomic.Uint32 (4 bytes) is used instead of go.uber.org/atomic
(8 bytes) to fit in existing struct padding without growing
memSeries. Chunk counts are bounded by the 3-byte field in
HeadChunkRef, so cannot overflow uint32.

Also fix pre-existing comment inaccuracies in the touched code:
headChunks.next -> headChunks.prev, mmapHeadChunks() -> mmapChunks()
in the doc comment, and a grammar error.

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-04-14 17:11:35 +02:00
Julien
1c449737e1
util/strutil: add Jaro-Winkler similarity implementation (#18405)
* util/strutil: add Jaro-Winkler similarity implementation

This is part of the implementation of prometheus/proposals#74

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

* util/strutil: optimise JaroWinkler with string-native ASCII path

Replace the generic jaroWinkler[T byte|rune] with two specialised
functions: jaroWinklerString (ASCII path) operates directly on the
string values and avoids the []byte conversion that previously caused
two heap allocations per call; jaroWinklerRunes (Unicode path) is
unchanged in algorithm but split out from the generic.

Both paths replace the repeated float64 divisions in the Jaro formula
with precomputed reciprocals (invL1, invL2).

Result: short ASCII strings drop from 2 allocs/op to 0 allocs/op;
long ASCII drops from 4 allocs/op to 2 allocs/op (bool match arrays
only).

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

* util/strutil: replace JaroWinkler with JaroWinklerMatcher

Remove the free JaroWinkler function and replace it with a
JaroWinklerMatcher struct. NewJaroWinklerMatcher pre-computes the
ASCII check and rune conversion for the search term once; Score then
runs the comparison against each candidate without repeating that work.

This is the expected usage pattern in Prometheus: one fixed term scored
against many label names or values.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

* Update util/strutil/jarowinkler.go and util/strutil/jarowinkler_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Julien <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

---------

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Julien <291750+roidelapluie@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-04-14 16:58:46 +02:00
Julien
0b067888c7
Merge pull request #18402 from roidelapluie/roidelapluie/strutil_subsequence
util/strutil: add subsequence matching implementation
2026-04-14 16:55:56 +02:00
Ali
48f4a41e38 util/runtime: skip TestFsType on unknown filesystems instead of accepting hex format
Rather than widening the assertion to accept raw hex codes, skip the
strict _MAGIC format check with t.Skipf when the filesystem is not in
the known map. The test still exercises the error paths and will run
fully on standard Linux/macOS filesystems.

Fixes prometheus/prometheus#18471

Signed-off-by: Ali <ali@kscope.ai>
2026-04-14 16:49:46 +05:00
Julien
12de1243c0
Merge pull request #18518 from prometheus/release-3.11
Some checks are pending
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 for Prometheus upgrades and downgrades (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 / Compliance testing (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
Merge back release 3.11.2
2026-04-14 10:26:38 +02:00
Ali
366ee531bb util/runtime: let TestFsType tolerate filesystems absent from FsType map
FsType() returns the known magic-name string when the filesystem is
present in its internal map, and falls back to strconv.FormatInt(..., 16)
otherwise. The test was asserting the *MAGIC regex only, so it failed
whenever it happened to run on a filesystem not yet mapped — the
downstream Arch Linux packager hit this with a btrfs subvolume.

Extend the regex to accept either a magic-name or the numeric
lowercase-hex fallback, keeping the test stable across OS upgrades and
exotic filesystems.

Fixes #18471

Signed-off-by: Ali <alliasgher123@gmail.com>
2026-04-14 01:21:26 +05:00
Julien
f0f0fdd679
Merge pull request #18517 from roidelapluie/roidelapluie/cut-3.11.2
Some checks failed
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 (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
Release 3.11.2
2026-04-13 13:39:08 +02:00
Julien Pivotto
f08b9837f9 Release 3.11.2
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-13 13:12:35 +02:00
Julien
931b2daf6f
Merge pull request #18510 from mrvarmazyar/fix/consul-health-filter-config-fixtures
Some checks are pending
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 / Compliance testing (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
config: add consul health_filter fixture coverage
2026-04-13 10:51:00 +02:00
Julius Volz
53a811bef4
Merge pull request #18514 from prometheus/remove-gitpod-files-and-badge
Some checks failed
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 for Prometheus upgrades and downgrades (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 / Compliance testing (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
Remove Gitpod config files and badge in README.md
2026-04-13 10:39:40 +02:00
Julius Volz
d946df2b66 Remove Gitpod config files and badge in README.md
Gitpod has rebranded to Ona a while ago and is now focusing on AI-agentic
coding, so at least the traditional links that opened the repo in a cloud-based
coding environment without login don't work anymore. So let's remove the files
and badge to get rid of old cruft.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-13 10:09:39 +02:00
Mohammad Varmazyar
06b7f1f625 config: add consul health_filter fixture coverage
Signed-off-by: Mohammad Varmazyar <mrvarmazyar@gmail.com>
2026-04-10 23:36:56 +02:00
Julius Volz
d4935fbf6e Fix OpenAPI defs
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-10 19:13:39 +02:00
Julius Volz
d456d314d2 Add some missing metrics protobuf field TypeScript definitions
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-10 16:06:33 +02:00
Julius Volz
034c29411a Use ProtoJSON, allow regex-based filtering of metric names
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-10 16:05:40 +02:00
Julius Volz
318c913fe2 Add API endpoint for getting Prometheus' metrics about itself
This adds a /api/v1/status/self_metrics endpoint that allows the frontend to
fetch metrics about the server itself, making it easier to construct frontend
pages that show the current server state. This is needed because fetching
metrics from its own /metrics endpoint would be both hard to parse and also
require CORS permissions on that endpoint (for cases where the frontend
dashboard is not the same origin, at least).

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-10 16:05:08 +02:00
Julien
fac097b161
Merge pull request #18499 from roidelapluie/roidelapluie/consul-health-filter-3.11
Some checks failed
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 (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
discovery/consul: add health_filter for Health API filtering
2026-04-10 15:15:47 +02:00
Julien
d09ea56b38
Update docs/configuration/configuration.md
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Julien <291750+roidelapluie@users.noreply.github.com>
2026-04-10 14:50:54 +02:00
Julien
e95d2e38e3
Merge pull request #18506 from roidelapluie/roidelapluie/backport-xss-issue
UI: Fix stored XSS via unescaped metric names and labels
2026-04-10 14:17:05 +02:00
Julius Volz
fddbccf79b UI: Fix stored XSS via unescaped metric names and labels
Metric names, label names, and label values containing HTML/JavaScript were
inserted into `innerHTML` without escaping in several UI code paths, enabling
stored XSS attacks via crafted metrics. This mostly becomes exploitable in
Prometheus 3.x, since it defaults to allowing any UTF-8 characters in metric
and label names.

Apply `escapeHTML()` to all user-controlled values before innerHTML
insertion in:

* Mantine UI chart tooltip
* Old React UI chart tooltip
* Old React UI metrics explorer fuzzy search
* Old React UI heatmap tooltip

See https://github.com/prometheus/prometheus/security/advisories/GHSA-vffh-x6r8-xx99

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-10 11:25:03 +02:00
George Krajcsovits
971e64756e
Merge pull request #18498 from ldufr/revive-emit-warning-when-sort-is-used-range
Some checks failed
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 (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
annotations: add warning for ineffective sort in range queries
2026-04-10 11:17:52 +02:00
Julius Volz
07c6232d15
Merge commit from fork
UI: Fix stored XSS via unescaped metric names and labels
2026-04-10 09:30:55 +01:00
Julien Pivotto
4cc50803ff discovery/consul: fix catalog watch trigger and improve filter tests
When health_filter is set without explicit services, the catalog needs
to be watched to enumerate services. Add watchedFilter to the condition
that triggers catalog watching.

Improve the filter test suite:
- Replace defer with t.Cleanup for stub servers.
- Rewrite TestFilterOption to assert that the catalog receives the filter
  and the health endpoint does not.
- Rewrite TestHealthFilterOption to assert that health_filter is routed
  correctly to the health endpoint only.
- Add TestBothFiltersOption to verify both filters are routed to their
  respective endpoints when both are configured.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-10 10:26:40 +02:00
Ben Kochie
92281f6542
Fix markdown format (#18505)
Fix the markdown format in SECURITY.md to satisfy `mdox fmt`.

Signed-off-by: SuperQ <superq@gmail.com>
2026-04-10 10:23:24 +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
Ben Kochie
b81f79b47f
Bump actions/setup-go (#18504)
Some checks are pending
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 for Prometheus upgrades and downgrades (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 / Compliance testing (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
Update actions/setup-go to the latest release.

Signed-off-by: SuperQ <superq@gmail.com>
2026-04-10 09:06:09 +02:00
Matthieu MOREL
44d617c671
build: update golangci-lint version to v2.11.4 (#18480)
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
Ben Kochie
c30b596c1f
Fix dockerignore sync (#18488)
Add `.dockerignore` to the always sync file list.
* Sort container archs.

Signed-off-by: SuperQ <superq@gmail.com>
2026-04-10 07:19:58 +02:00
Arthur Silva Sens
72293ff1d2
Merge pull request #18433 from codeboten/codeboten/remove-docker-monopkg-dep
Some checks are pending
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 for Prometheus upgrades and downgrades (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 / Compliance testing (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
chore: remove dependency on github.com/docker/docker
2026-04-09 11:58:10 -03:00
Julien
485be91363
Merge pull request #18483 from rudo-thomas/patch-1
docs: Copy-paste typo in __meta_kubernetes_namespace in endpointslice role.
2026-04-09 16:22:06 +02:00
Julien Pivotto
1e73d2fcde discovery/consul: add health_filter for Health API filtering
The filter field was documented as targeting the Catalog API but since
PR #17349 it was also passed to the Health API. This broke existing
configs using Catalog-only fields like ServiceTags, which the Health API
rejects (it uses Service.Tags instead).

Introduce a separate health_filter field that is passed exclusively to
the Health API, while filter remains catalog-only. Update the docs to
explain the two-phase discovery (Catalog for service listing, Health for
instances) and the field name differences between the two APIs.

Fixes #18479

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-09 16:03:16 +02:00
Julien
d3478dc7fe
Merge pull request #18486 from prometheus/arthursens/remove-replace
Remove unnecessary replace directive
2026-04-09 15:28:11 +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
mishraa-G
a6ffcaa352
rulefmt: warn when multi-document rule files are detected (#18114)
Signed-off-by: Divyansh Mishra <divyanshmishra@Divyanshs-MacBook-Air-3.local>
Co-authored-by: Divyansh Mishra <mishraa-G@users.noreply.github.com>
Co-authored-by: Divyansh Mishra <divyanshmishra@Divyanshs-MacBook-Air-3.local>
2026-04-09 14:40:18 +02:00
Julien
06e0b5af5b
Merge pull request #18496 from roidelapluie/roidelapluie/speed-up
chore: speed up build time by moving helpers to test files.
2026-04-09 13:05:31 +02:00
Julien Pivotto
f45a7ee818 chore: speed up build time by moving helpers to test files.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-09 12:02:29 +02:00
Julien
6115f305e2
Merge pull request #18478 from prometheus/release-3.11
Merge back Release 3.11.1
2026-04-09 09:54:44 +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
Arthur Silva Sens
568af785d2
Remove unnecessary replace directive
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2026-04-08 14:48:40 -03:00
Arve Knudsen
56c6370b26
promql: fix info() handling of negated __name__ matchers (#17932)
Some checks are pending
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 for Prometheus upgrades and downgrades (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 / Compliance testing (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: 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
Julien
e77e0eb761
Merge pull request #18482 from prometheus/superq/docker_archs
Update common container archs
2026-04-08 16:38:26 +02:00
SuperQ
f186cfdad1
Update common container archs
Promote the Prometheus container archs settings to common so they
are used by default on other projects.
* Add `.dockerignore` to sync script to include docker archs.

Signed-off-by: SuperQ <superq@gmail.com>
2026-04-08 15:25:07 +02:00