Skip to content

Commit 9ecd10f

Browse files
Merge tag 'refs/tags/v0.12.0'
v0.12.0 # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCgAdFiEE/jCAc0MNZY5toBt1AZCmbAoQ/E8FAmiTXisACgkQAZCmbAoQ # /E+L0Q//a3ac4Q//nvjnnQmpowhqTwAS+bBLXwrQ/iXpc95wO5ZOgjskJQavaaxP # oop7uoRVUKlQRjxtb01/zKbs/IKgdxukkQJ2rkKl1/ZBo2ycApqgnfPMnAN9EadN # Wp2Qw8yvAnGivydCGU4iSa3OhF85UarXz/112VVLhRU+sY3Hpcc43EX019qIqATb # adYft+G5DdxTW2jf5Hz0XgowrkB4Ymk1QbjOAkcnrDyVpuijEcpekAnpDKAtH0nN # +n9jfk2rf0pUHNcKRMe4X3YKrWu4HI7Z5Gr3JO0OfjZ3G5mkaMx27y3uSkYm8Qn7 # iWpANcaPpw3UU7c/EoR1O6eYooSg9uvDOY8WaHfK+Sj5f4j+2Gwq1t3Lwt2GzgGE # rehMt42IAmcUvl3c2ROOZl35lA89CpPyReegKAeEWVToh1akBWHI+R7/v4JBkRrg # bNsz72o6vbTSSOv9tZ5teRGmGi/ptxwT/KQx3x9VlD7qKMx7thGsoFY6Wd3UEXC3 # weRhZCr4K1h0xT8b72a5wYtMq1++IiAuAmUKnbxXBhLh7nKCR3lbDZu5x4rzBrh5 # Lcri2SxF22HWAmy61nyDjzF6nz2L7hOHgIrKTts1UP+GdQ4vEkMRgj+dPoBjzXcC # xyowSGIzuxh3qtE9ZNxR6dZkrObCrx5xqpca3FftG7zV3XzzNPM= # =RZ43 # -----END PGP SIGNATURE----- # gpg: directory '/home/runner/.gnupg' created # gpg: keybox '/home/runner/.gnupg/pubring.kbx' created # gpg: Signature made Wed Aug 6 13:52:43 2025 UTC # gpg: using RSA key FE308073430D658E6DA01B750190A66C0A10FC4F # gpg: Can't check signature: No public key
2 parents 3162eb7 + 45418e4 commit 9ecd10f

File tree

12 files changed

+274
-122
lines changed

12 files changed

+274
-122
lines changed

.github/workflows/container_description.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
steps:
2020
- name: git checkout
2121
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
with:
23+
persist-credentials: false
2224
- name: Set docker hub repo name
2325
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
2426
- name: Push README to Dockerhub
@@ -41,6 +43,8 @@ jobs:
4143
steps:
4244
- name: git checkout
4345
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
with:
47+
persist-credentials: false
4448
- name: Set quay.io org name
4549
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
4650
- name: Set quay.io repo name

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,17 @@ jobs:
2525
steps:
2626
- name: Checkout repository
2727
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
2830
- name: Install Go
29-
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
31+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3032
with:
3133
go-version: 1.24.x
3234
- name: Install snmp_exporter/generator dependencies
3335
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
3436
if: github.repository == 'prometheus/snmp_exporter'
3537
- name: Lint
36-
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
38+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
3739
with:
3840
args: --verbose
39-
version: v2.1.5
41+
version: v2.2.1

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.12.0 / 2025-08-06
2+
3+
* [ENHANCEMENT] Add the `-enable-promql-duration-expression-parsing` flag to support arithmetic for durations in PromQL expressions. #297
4+
* [ENHANCEMENT] Add the `-enable-promql-experimental-functions` flag to support experimental functions in PromQL expressions. #297
5+
* [ENHANCEMENT] Add the `-enable-label-matchers-for-rules-api` flag to filter rules using label matchers. #295
6+
17
## 0.11.1 / 2025-05-12
28

39
Rebuild with the latest Go compiler (`go1.24.3`).

Makefile.common

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
8888
SKIP_GOLANGCI_LINT :=
8989
GOLANGCI_LINT :=
9090
GOLANGCI_LINT_OPTS ?=
91-
GOLANGCI_LINT_VERSION ?= v2.1.5
91+
GOLANGCI_LINT_VERSION ?= v2.2.1
92+
GOLANGCI_FMT_OPTS ?=
9293
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
9394
# windows isn't included here because of the path separator being different.
9495
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
@@ -165,7 +166,7 @@ common-deps:
165166
update-go-deps:
166167
@echo ">> updating Go dependencies"
167168
@for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \
168-
$(GO) get -d $$m; \
169+
$(GO) get $$m; \
169170
done
170171
$(GO) mod tidy
171172

@@ -183,9 +184,13 @@ $(GOTEST_DIR):
183184
@mkdir -p $@
184185

185186
.PHONY: common-format
186-
common-format:
187+
common-format: $(GOLANGCI_LINT)
187188
@echo ">> formatting code"
188189
$(GO) fmt $(pkgs)
190+
ifdef GOLANGCI_LINT
191+
@echo ">> formatting code with golangci-lint"
192+
$(GOLANGCI_LINT) fmt $(GOLANGCI_FMT_OPTS)
193+
endif
189194

190195
.PHONY: common-vet
191196
common-vet:
@@ -280,8 +285,8 @@ $(PROMU):
280285
rm -r $(PROMU_TMP)
281286
endif
282287

283-
.PHONY: proto
284-
proto:
288+
.PHONY: common-proto
289+
common-proto:
285290
@echo ">> generating code from proto files"
286291
@./scripts/genproto.sh
287292

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ prom-label-proxy \
217217
-rules-with-active-alerts
218218
```
219219
220+
If the upstream supports label matchers (Prometheus >= v2.54.0 and Thanos >= v0.25.0), you can use the `-enable-label-matchers-for-rules-api` option to filter the result at the source which is more efficient.
221+
220222
### Alerts endpoint
221223
222224
The proxy requests the `/api/v1/alerts` Prometheus endpoint, discards the rules that don't contain an exact match of the label(s) and returns the modified response to the client.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.11.1
1+
0.12.0

go.mod

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ require (
99
github.com/go-openapi/runtime v0.28.0
1010
github.com/go-openapi/strfmt v0.23.0
1111
github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a
12-
github.com/oklog/run v1.1.0
12+
github.com/oklog/run v1.2.0
1313
github.com/prometheus/alertmanager v0.28.1
14-
github.com/prometheus/client_golang v1.22.0
15-
github.com/prometheus/prometheus v0.303.1
14+
github.com/prometheus/client_golang v1.23.0
15+
github.com/prometheus/prometheus v0.305.0
1616
gotest.tools/v3 v3.5.2
1717
)
1818

@@ -40,18 +40,18 @@ require (
4040
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4141
github.com/oklog/ulid v1.3.1 // indirect
4242
github.com/opentracing/opentracing-go v1.2.0 // indirect
43-
github.com/prometheus/client_model v0.6.1 // indirect
44-
github.com/prometheus/common v0.63.0 // indirect
45-
github.com/prometheus/procfs v0.15.1 // indirect
43+
github.com/prometheus/client_model v0.6.2 // indirect
44+
github.com/prometheus/common v0.65.0 // indirect
45+
github.com/prometheus/procfs v0.16.1 // indirect
4646
go.mongodb.org/mongo-driver v1.14.0 // indirect
4747
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
48-
go.opentelemetry.io/otel v1.35.0 // indirect
49-
go.opentelemetry.io/otel/metric v1.35.0 // indirect
50-
go.opentelemetry.io/otel/trace v1.35.0 // indirect
48+
go.opentelemetry.io/otel v1.36.0 // indirect
49+
go.opentelemetry.io/otel/metric v1.36.0 // indirect
50+
go.opentelemetry.io/otel/trace v1.36.0 // indirect
5151
go.uber.org/atomic v1.11.0 // indirect
52-
golang.org/x/sync v0.12.0 // indirect
53-
golang.org/x/sys v0.30.0 // indirect
54-
golang.org/x/text v0.23.0 // indirect
55-
google.golang.org/protobuf v1.36.5 // indirect
52+
golang.org/x/sync v0.15.0 // indirect
53+
golang.org/x/sys v0.33.0 // indirect
54+
golang.org/x/text v0.26.0 // indirect
55+
google.golang.org/protobuf v1.36.6 // indirect
5656
gopkg.in/yaml.v3 v3.0.1 // indirect
5757
)

0 commit comments

Comments
 (0)