Skip to content

Commit 9a1bb28

Browse files
committed
Merge upstream/master into overrides_api
Signed-off-by: Bogdan Stancu <stancu.bogdan.nicolae@gmail.com>
2 parents 8ba408b + 5859b3d commit 9a1bb28

File tree

1,579 files changed

+179790
-140657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,579 files changed

+179790
-140657
lines changed

.github/workflows/scripts/install-docker.sh

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,30 @@
22

33
set -x
44
VER="28.0.4"
5-
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
5+
6+
# Detect architecture
7+
ARCH=$(uname -m)
8+
case $ARCH in
9+
x86_64)
10+
DOCKER_ARCH="x86_64"
11+
BUILDX_ARCH="amd64"
12+
;;
13+
aarch64)
14+
DOCKER_ARCH="aarch64"
15+
BUILDX_ARCH="arm64"
16+
;;
17+
*)
18+
echo "Unsupported architecture: $ARCH"
19+
exit 1
20+
;;
21+
esac
22+
23+
echo "Installing Docker $VER for architecture: $ARCH (docker: $DOCKER_ARCH, buildx: $BUILDX_ARCH)"
24+
25+
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/$DOCKER_ARCH/docker-$VER.tgz
626
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
727
mkdir -vp ~/.docker/cli-plugins/
8-
curl --silent -L "https://github.com/docker/buildx/releases/download/v0.3.0/buildx-v0.3.0.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
28+
curl --silent -L "https://github.com/docker/buildx/releases/download/v0.3.0/buildx-v0.3.0.linux-$BUILDX_ARCH" > ~/.docker/cli-plugins/docker-buildx
929
chmod a+x ~/.docker/cli-plugins/docker-buildx
1030
mv /tmp/docker/* /usr/bin
1131
docker run --privileged --rm tonistiigi/binfmt --install all

.github/workflows/test-build-deploy.yml

Lines changed: 74 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
run: make BUILD_IN_CONTAINER=false check-doc
4343
- name: Check White Noise.
4444
run: make BUILD_IN_CONTAINER=false check-white-noise
45+
- name: Check Modernize
46+
run: make BUILD_IN_CONTAINER=false check-modernize
4547

4648
test:
4749
runs-on: ubuntu-24.04
@@ -150,19 +152,60 @@ jobs:
150152

151153
integration:
152154
needs: build
153-
runs-on: ubuntu-24.04
155+
runs-on: ${{ matrix.runner }}
156+
timeout-minutes: 50
154157
strategy:
155158
fail-fast: false
156159
matrix:
157-
tags:
158-
- requires_docker
159-
- integration_alertmanager
160-
- integration_backward_compatibility
161-
- integration_memberlist
162-
- integration_querier
163-
- integration_ruler
164-
- integration_query_fuzz
165-
- integration_remote_write_v2
160+
include:
161+
- runner: ubuntu-24.04
162+
arch: amd64
163+
tags: requires_docker
164+
- runner: ubuntu-24.04
165+
arch: amd64
166+
tags: integration_alertmanager
167+
- runner: ubuntu-24.04
168+
arch: amd64
169+
tags: integration_backward_compatibility
170+
- runner: ubuntu-24.04
171+
arch: amd64
172+
tags: integration_memberlist
173+
- runner: ubuntu-24.04
174+
arch: amd64
175+
tags: integration_querier
176+
- runner: ubuntu-24.04
177+
arch: amd64
178+
tags: integration_ruler
179+
- runner: ubuntu-24.04
180+
arch: amd64
181+
tags: integration_query_fuzz
182+
- runner: ubuntu-24.04
183+
arch: amd64
184+
tags: integration_remote_write_v2
185+
- runner: ubuntu-24.04-arm
186+
arch: arm64
187+
tags: requires_docker
188+
- runner: ubuntu-24.04-arm
189+
arch: arm64
190+
tags: integration_alertmanager
191+
- runner: ubuntu-24.04-arm
192+
arch: arm64
193+
tags: integration_memberlist
194+
- runner: ubuntu-24.04-arm
195+
arch: arm64
196+
tags: integration_ruler
197+
- runner: ubuntu-24.04-arm
198+
arch: arm64
199+
tags: integration_remote_write_v2
200+
- runner: ubuntu-24.04-arm
201+
arch: arm64
202+
tags: integration_query_fuzz
203+
- runner: ubuntu-24.04-arm
204+
arch: arm64
205+
tags: integration_backward_compatibility
206+
- runner: ubuntu-24.04-arm
207+
arch: arm64
208+
tags: integration_querier
166209
steps:
167210
- name: Upgrade golang
168211
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
@@ -195,42 +238,43 @@ jobs:
195238
docker pull consul:1.8.4
196239
docker pull gcr.io/etcd-development/etcd:v3.4.7
197240
if [ "$TEST_TAGS" = "integration_backward_compatibility" ]; then
198-
docker pull quay.io/cortexproject/cortex:v1.13.1
199-
docker pull quay.io/cortexproject/cortex:v1.13.2
200-
docker pull quay.io/cortexproject/cortex:v1.14.0
201-
docker pull quay.io/cortexproject/cortex:v1.14.1
202-
docker pull quay.io/cortexproject/cortex:v1.15.0
203-
docker pull quay.io/cortexproject/cortex:v1.15.1
204-
docker pull quay.io/cortexproject/cortex:v1.15.2
205-
docker pull quay.io/cortexproject/cortex:v1.15.3
206-
docker pull quay.io/cortexproject/cortex:v1.16.0
207241
docker pull quay.io/cortexproject/cortex:v1.16.1
208-
docker pull quay.io/cortexproject/cortex:v1.17.0
209-
docker pull quay.io/cortexproject/cortex:v1.17.1
210-
docker pull quay.io/cortexproject/cortex:v1.18.0
242+
docker pull quay.io/cortexproject/cortex:v1.17.2
211243
docker pull quay.io/cortexproject/cortex:v1.18.1
244+
docker pull quay.io/cortexproject/cortex:v1.19.1
245+
docker pull quay.io/cortexproject/cortex:v1.20.0
212246
elif [ "$TEST_TAGS" = "integration_query_fuzz" ]; then
213-
docker pull quay.io/cortexproject/cortex:v1.18.1
214-
docker pull quay.io/prometheus/prometheus:v3.5.0
247+
docker pull quay.io/cortexproject/cortex:v1.20.0
248+
docker pull quay.io/prometheus/prometheus:v3.6.0
215249
fi
216250
docker pull memcached:1.6.1
217251
docker pull redis:7.0.4-alpine
218252
env:
219253
TEST_TAGS: ${{ matrix.tags }}
220254
- name: Integration Tests
255+
timeout-minutes: 45
221256
run: |
222257
export CORTEX_IMAGE_PREFIX="${IMAGE_PREFIX:-quay.io/cortexproject/}"
223258
export IMAGE_TAG=$(make image-tag)
224-
export CORTEX_IMAGE="${CORTEX_IMAGE_PREFIX}cortex:$IMAGE_TAG-amd64"
259+
export CORTEX_IMAGE="${CORTEX_IMAGE_PREFIX}cortex:${IMAGE_TAG}-${{ matrix.arch }}"
225260
export CORTEX_CHECKOUT_DIR="/go/src/github.com/cortexproject/cortex"
226-
echo "Running integration tests with image: $CORTEX_IMAGE"
261+
echo "Running integration tests on ${{ matrix.arch }} with image: ${CORTEX_IMAGE}"
227262
go test -tags=slicelabels,integration,${{ matrix.tags }} -timeout 2400s -v -count=1 ./integration/...
228263
env:
229264
IMAGE_PREFIX: ${{ secrets.IMAGE_PREFIX }}
230265

231266
integration-configs-db:
232267
needs: build
233-
runs-on: ubuntu-24.04
268+
runs-on: ${{ matrix.runner }}
269+
timeout-minutes: 20
270+
strategy:
271+
fail-fast: false
272+
matrix:
273+
include:
274+
- runner: ubuntu-24.04
275+
arch: amd64
276+
- runner: ubuntu-24.04-arm
277+
arch: arm64
234278
steps:
235279
- name: Checkout Repo
236280
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -243,15 +287,17 @@ jobs:
243287
- name: Extract Docker Images Archive
244288
run: tar -xvf images.tar -C /
245289
- name: Run Integration Configs Tests
290+
timeout-minutes: 15
246291
# Github Actions does not support TTY in their default runners yet
247292
run: |
248293
touch build-image/.uptodate
249294
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations
295+
echo "Running configs integration tests on ${{ matrix.arch }}"
250296
make BUILD_IMAGE=quay.io/cortexproject/build-image:master-59491e9aae TTY='' configs-integration-test
251297
252298
deploy_website:
253299
needs: [build, test]
254-
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
300+
if: github.ref == 'refs/heads/master' && github.repository == 'cortexproject/cortex'
255301
runs-on: ubuntu-24.04
256302
container:
257303
image: quay.io/cortexproject/build-image:master-59491e9aae

ADOPTERS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ This is the list of organisations that are using Cortex in **production environm
2121
* [Planetary Quantum](https://www.planetary-quantum.com)
2222
* [Platform9](https://platform9.com/)
2323
* [REWE Digital](https://rewe-digital.com/)
24+
* [Swiggy](https://www.swiggy.in/)
2425
* [SysEleven](https://www.syseleven.de/)
2526
* [Twilio](https://www.twilio.com/)

CHANGELOG.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
11
# Changelog
22

33
## master / unreleased
4+
5+
* [FEATURE] StoreGateway: Introduces a new parquet mode. #7046
6+
* [ENHANCEMENT] Alertmanager: Upgrade alertmanger to 0.29.0 and add a new incidentIO integration. #7092
7+
* [ENHANCEMENT] Querier: Add a `-querier.parquet-queryable-shard-cache-ttl` flag to add TTL to parquet shard cache. #7098
8+
* [ENHANCEMENT] Ingester: Add `enable_matcher_optimization` config to apply low selectivity matchers lazily. #7063
9+
* [ENHANCEMENT] Distributor: Add a label references validation for remote write v2 request. #7074
10+
* [ENHANCEMENT] Distributor: Add count, spans, and buckets validations for native histogram. #7072
11+
* [ENHANCEMENT] Alertmanager/Ruler: Introduce a user scanner to reduce the number of list calls to object storage. #6999
12+
* [ENHANCEMENT] Ruler: Add DecodingConcurrency config flag for Thanos Engine. #7118
13+
* [ENHANCEMENT] Compactor: Avoid double compaction by cleaning partition files in 2 cycles. #7129
14+
* [BUGFIX] Ring: Change DynamoDB KV to retry indefinitely for WatchKey. #7088
15+
* [BUGFIX] Ruler: Add XFunctions validation support. #7111
16+
* [BUGFIX] Distributor: Fix panic on health check failure when using stream push. #7116
17+
18+
## 1.20.0 2025-11-10
19+
420
* [CHANGE] StoreGateway/Alertmanager: Add default 5s connection timeout on client. #6603
521
* [CHANGE] Ingester: Remove EnableNativeHistograms config flag and instead gate keep through new per-tenant limit at ingestion. #6718
622
* [CHANGE] Validate a tenantID when to use a single tenant resolver. #6727
23+
* [CHANGE] Ring: Add zone label to ring_members metric. #6900
724
* [FEATURE] Distributor: Add an experimental `-distributor.otlp.enable-type-and-unit-labels` flag to add `__type__` and `__unit__` labels for OTLP metrics. #6969
825
* [FEATURE] Distributor: Add an experimental `-distributor.otlp.allow-delta-temporality` flag to ingest delta temporality otlp metrics. #6934
926
* [FEATURE] Query Frontend: Add dynamic interval size for query splitting. This is enabled by configuring experimental flags `querier.max-shards-per-query` and/or `querier.max-fetched-data-duration-per-query`. The split interval size is dynamically increased to maintain a number of shards and total duration fetched below the configured values. #6458
1027
* [FEATURE] Querier/Ruler: Add `query_partial_data` and `rules_partial_data` limits to allow queries/rules to be evaluated with data from a single zone, if other zones are not available. #6526
1128
* [FEATURE] Update prometheus alertmanager version to v0.28.0 and add new integration msteamsv2, jira, and rocketchat. #6590
1229
* [FEATURE] Ingester/StoreGateway: Add `ResourceMonitor` module in Cortex, and add `ResourceBasedLimiter` in Ingesters and StoreGateways. #6674
1330
* [FEATURE] Support Prometheus remote write 2.0. #6330
14-
* [FEATURE] Ingester: Support out-of-order native histogram ingestion. It automatically enabled when `-ingester.out-of-order-time-window > 0` and `-blocks-storage.tsdb.enable-native-histograms=true`. #6626 #6663
31+
* [FEATURE] Ingester: Support out-of-order native histogram ingestion. It is automatically enabled when `-ingester.out-of-order-time-window > 0` and `-blocks-storage.tsdb.enable-native-histograms=true`. #6626 #6663
1532
* [FEATURE] Ruler: Add support for percentage based sharding for rulers. #6680
1633
* [FEATURE] Ruler: Add support for group labels. #6665
1734
* [FEATURE] Query federation: Introduce a regex tenant resolver to allow regex in `X-Scope-OrgID` value. #6713
@@ -20,12 +37,17 @@
2037
* [FEATURE] Experimental Support Parquet format: Implement parquet converter service to convert a TSDB block into Parquet and Parquet Queryable. #6716 #6743
2138
* [FEATURE] Distributor/Ingester: Implemented experimental feature to use gRPC stream connection for push requests. This can be enabled by setting `-distributor.use-stream-push=true`. #6580
2239
* [FEATURE] Compactor: Add support for percentage based sharding for compactors. #6738
23-
* [FEATURE] Querier: Allow choosing PromQL engine via header. #6777
40+
* [FEATURE] Querier: Allow choosing PromQL engine via header `X-PromQL-EngineType`. #6777
2441
* [FEATURE] Querier: Support for configuring query optimizers and enabling XFunctions in the Thanos engine. #6873
2542
* [FEATURE] Query Frontend: Add support /api/v1/format_query API for formatting queries. #6893
2643
* [FEATURE] Query Frontend: Add support for /api/v1/parse_query API (experimental) to parse a PromQL expression and return it as a JSON-formatted AST (abstract syntax tree). #6978
44+
* [ENHANCEMENT] Upgrade the Prometheus version to 3.6.0 and add a `-name-validation-scheme` flag to support UTF-8. #7040 #7056
45+
* [ENHANCEMENT] Distributor: Emit an error with a 400 status code when empty labels are found before the relabelling or label dropping process. #7052
46+
* [ENHANCEMENT] Parquet Storage: Add support for additional sort columns during Parquet file generation #7003
47+
* [ENHANCEMENT] Modernizes the entire codebase by using go modernize tool. #7005
2748
* [ENHANCEMENT] Overrides Exporter: Expose all fields that can be converted to float64. Also, the label value `max_local_series_per_metric` got renamed to `max_series_per_metric`, and `max_local_series_per_user` got renamed to `max_series_per_user`. #6979
2849
* [ENHANCEMENT] Ingester: Add `cortex_ingester_tsdb_wal_replay_unknown_refs_total` and `cortex_ingester_tsdb_wbl_replay_unknown_refs_total` metrics to track unknown series references during wal/wbl replaying. #6945
50+
* [ENHANCEMENT] Distributor: Introduce a Protobuf model for Prometheus Remote Write 2.0 and a pool to improve performance. #6917
2951
* [ENHANCEMENT] Ruler: Emit an error message when the rule synchronization fails. #6902
3052
* [ENHANCEMENT] Querier: Support snappy and zstd response compression for `-querier.response-compression` flag. #6848
3153
* [ENHANCEMENT] Tenant Federation: Add a # of query result limit logic when the `-tenant-federation.regex-matcher-enabled` is enabled. #6845
@@ -35,9 +57,8 @@
3557
* [ENHANCEMENT] Ingester: Add a `cortex_ingester_active_native_histogram_series` metric to track # of active NH series. #6695
3658
* [ENHANCEMENT] Query Frontend: Add new limit `-frontend.max-query-response-size` for total query response size after decompression in query frontend. #6607
3759
* [ENHANCEMENT] Alertmanager: Add nflog and silences maintenance metrics. #6659
38-
* [ENHANCEMENT] Querier: limit label APIs to query only ingesters if `start` param is not been specified. #6618
60+
* [ENHANCEMENT] Querier: limit label APIs to query only ingesters if `start` param is not specified. #6618
3961
* [ENHANCEMENT] Alertmanager: Add new limits `-alertmanager.max-silences-count` and `-alertmanager.max-silences-size-bytes` for limiting silences per tenant. #6605
40-
* [ENHANCEMENT] Update prometheus version to v3.1.0. #6583
4162
* [ENHANCEMENT] Add `compactor.auto-forget-delay` for compactor to auto forget compactors after X minutes without heartbeat. #6533
4263
* [ENHANCEMENT] StoreGateway: Emit more histogram buckets on the `cortex_querier_storegateway_refetches_per_query` metric. #6570
4364
* [ENHANCEMENT] Querier: Apply bytes limiter to LabelNames and LabelValuesForLabelNames. #6568
@@ -66,7 +87,6 @@
6687
* [ENHANCEMENT] Distributor: Add native histograms max sample size bytes limit validation. #6834
6788
* [ENHANCEMENT] Querier: Support caching parquet labels file in parquet queryable. #6835
6889
* [ENHANCEMENT] Querier: Support query limits in parquet queryable. #6870
69-
* [ENHANCEMENT] Ring: Add zone label to ring_members metric. #6900
7090
* [ENHANCEMENT] Ingester: Add new metric `cortex_ingester_push_errors_total` to track reasons for ingester request failures. #6901
7191
* [ENHANCEMENT] Ring: Expose `detailed_metrics_enabled` for all rings. Default true. #6926
7292
* [ENHANCEMENT] Parquet Storage: Allow Parquet Queryable to disable fallback to Store Gateway. #6920
@@ -76,6 +96,10 @@
7696
* [ENHANCEMENT] Upgrade build image and Go version to 1.24.6. #6970 #6976
7797
* [ENHANCEMENT] Implement versioned transactions for writes to DynamoDB ring. #6986
7898
* [ENHANCEMENT] Add source metadata to requests(api vs ruler) #6947
99+
* [ENHANCEMENT] Add new metric `cortex_discarded_series` and `cortex_discarded_series_per_labelset` to track number of series that have a discarded sample. #6995
100+
* [ENHANCEMENT] Ingester: Add `cortex_ingester_tsdb_head_stale_series` metric to keep track of number of stale series on head. #7071
101+
* [ENHANCEMENT] Expose more Go runtime metrics. #7070
102+
* [ENHANCEMENT] Distributor: Filter out label with empty value. #7069
79103
* [BUGFIX] Ingester: Avoid error or early throttling when READONLY ingesters are present in the ring #6517
80104
* [BUGFIX] Ingester: Fix labelset data race condition. #6573
81105
* [BUGFIX] Compactor: Cleaner should not put deletion marker for blocks with no-compact marker. #6576
@@ -95,6 +119,16 @@
95119
* [BUGFIX] Compactor: Delete the prefix `blocks_meta` from the metadata fetcher metrics. #6832
96120
* [BUGFIX] Store Gateway: Avoid race condition by deduplicating entries in bucket stores user scan. #6863
97121
* [BUGFIX] Runtime-config: Change to check tenant limit validation when loading runtime config only for `all`, `distributor`, `querier`, and `ruler` targets. #6880
122+
* [BUGFIX] Distributor: Fix `/distributor/all_user_stats` api to work during rolling updates on ingesters. #7026
123+
* [BUGFIX] Runtime-config: Fix panic when the runtime config is `null`. #7062
124+
* [BUGFIX] Scheduler: Avoid all queriers reserved for prioritized requests. #7057
125+
* [BUGFIX] Fix bug where validating metric names uses the wrong validation logic. #7086
126+
* [BUGFIX] Compactor: Avoid race condition which allow a grouper to not compact all partitions. #7082
127+
* [BUGFIX] Add alertmanager receiver validation for discord and email. #7097
128+
129+
## 1.19.1 2025-09-20
130+
131+
* [BUGFIX] Frontend: Fix remote read snappy input due to request string logging when query stats enabled. #7025
98132

99133
## 1.19.0 2025-02-27
100134

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ GOVOLUMES= -v $(shell pwd)/.cache:/go/cache:delegated,z \
126126
-v $(shell pwd)/.pkg:/go/pkg:delegated,z \
127127
-v $(shell pwd):/go/src/github.com/cortexproject/cortex:delegated,z
128128

129-
exes $(EXES) protos $(PROTO_GOS) lint test cover shell mod-check check-protos web-build web-pre web-deploy doc: build-image/$(UPTODATE)
129+
exes $(EXES) protos $(PROTO_GOS) lint test cover shell mod-check check-protos web-build web-pre web-deploy doc modernize: build-image/$(UPTODATE)
130130
@mkdir -p $(shell pwd)/.pkg
131131
@mkdir -p $(shell pwd)/.cache
132132
@echo
@@ -251,6 +251,9 @@ web-build: web-pre
251251
web-deploy:
252252
./tools/website/web-deploy.sh
253253

254+
modernize:
255+
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.20.0 -fix ./...
256+
254257
# Generates the config file documentation.
255258
doc: clean-doc
256259
go run -tags slicelabels ./tools/doc-generator ./docs/configuration/config-file-reference.template > ./docs/configuration/config-file-reference.md
@@ -260,6 +263,7 @@ doc: clean-doc
260263
go run -tags slicelabels ./tools/doc-generator ./docs/guides/encryption-at-rest.template > ./docs/guides/encryption-at-rest.md
261264
embedmd -w docs/operations/requests-mirroring-to-secondary-cluster.md
262265
embedmd -w docs/guides/overrides-exporter.md
266+
go run -tags slicelabels ./tools/doc-generator -json-schema > ./schemas/cortex-config-schema.json
263267

264268
endif
265269

@@ -308,6 +312,9 @@ clean-white-noise:
308312
check-white-noise: clean-white-noise
309313
@git diff --exit-code --quiet -- '*.md' || (echo "Please remove trailing whitespaces running 'make clean-white-noise'" && false)
310314

315+
check-modernize: modernize
316+
@git diff --exit-code -- . || (echo "Please modernize running 'make modernize'" && false)
317+
311318
web-serve:
312319
cd website && hugo --config config.toml --minify -v server
313320

RELEASE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Our goal is to provide a new minor release every 6 weeks. This is a new process
3535
| v1.17.0 | 2024-04-25 | Ben Ye (@yeya24) |
3636
| v1.18.0 | 2024-08-16 | Daniel Blando (@danielblando) |
3737
| v1.19.0 | 2025-01-22 | Charlie Le (@charlietle) |
38+
| v1.20.0 | 2025-10-31 | Ben Ye (@yeya24) |
3839

3940
## Release shepherd responsibilities
4041

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.19.0
1+
1.20.0

0 commit comments

Comments
 (0)