Skip to content

Commit 9fcdf08

Browse files
authored
Merge branch 'master' into Enable-HATracker-memberlist
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
2 parents 3276e1c + e58cd6c commit 9fcdf08

34 files changed

Lines changed: 1101 additions & 165 deletions

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Changelog
22

33
## master / unreleased
4+
* [CHANGE] Ruler: Graduate Ruler API from experimental. #7312
5+
* Flag: Renamed `-experimental.ruler.enable-api` to `-ruler.enable-api`. The old flag is kept as deprecated.
6+
* Ruler API is no longer marked as experimental.
7+
* [CHANGE] Alertmanager: Graduate Alertmanager API and sharding from experimental. #7315
8+
* Flag: Renamed `-experimental.alertmanager.enable-api` to `-alertmanager.enable-api`. The old flag is kept as deprecated.
9+
* Alertmanager sharding is no longer marked as experimental.
410
* [CHANGE] Blocks storage: Bucket index is now enabled by default. Disabling the bucket index (`-blocks-storage.bucket-store.bucket-index.enabled=false`) is not recommended for production. #7259
511
* [CHANGE] Users Scanner: Rename user index update configuration. #7180
612
* Flag: Renamed `-*.users-scanner.user-index.cleanup-interval` to `-*.users-scanner.user-index.update-interval`.
@@ -10,6 +16,7 @@
1016
* Flags: Renamed `-querier.parquet-queryable-shard-cache-size` to `-querier.parquet-shard-cache-size` and `-querier.parquet-queryable-shard-cache-ttl` to `-querier.parquet-shard-cache-ttl`.
1117
* Config: Renamed `parquet_queryable_shard_cache_size` to `parquet_shard_cache_size` and `parquet_queryable_shard_cache_ttl` to `parquet_shard_cache_ttl`.
1218
* [FEATURE] HATracker: Add experimental support for `memberlist` and `multi` as a KV store backend. #7284
19+
* [FEATURE] Distributor: Add `-distributor.otlp.add-metric-suffixes` flag. If true, suffixes will be added to the metrics for name normalization. #7286
1320
* [FEATURE] StoreGateway: Introduces a new parquet mode. #7046
1421
* [FEATURE] StoreGateway: Add a parquet shard cache to parquet mode. #7166
1522
* [FEATURE] Distributor: Add a per-tenant flag `-distributor.enable-type-and-unit-labels` that enables adding `__unit__` and `__type__` labels for remote write v2 and OTLP requests. This is a breaking change; the `-distributor.otlp.enable-type-and-unit-labels` flag is now deprecated, operates as a no-op, and has been consolidated into this new flag. #7077
@@ -45,6 +52,7 @@
4552
* [ENHANCEMENT] Compactor: Add partition group creation time to visit marker. #7217
4653
* [ENHANCEMENT] Compactor: Add concurrency for partition cleanup and mark block for deletion #7246
4754
* [ENHANCEMENT] Distributor: Validate metric name before removing empty labels. #7253
55+
* [ENHANCEMENT] Ruler/Ingester: Propagate append hints to discard out of order samples on Ingester #7226
4856
* [ENHANCEMENT] Make cortex_ingester_tsdb_sample_ooo_delta metric per-tenant #7278
4957
* [ENHANCEMENT] Distributor: Add dimension `nhcb` to keep track of nhcb samples in `cortex_distributor_received_samples_total` and `cortex_distributor_samples_in_total` metrics.
5058
* [ENHANCEMENT] Distributor: Add `-distributor.accept-unknown-remote-write-content-type` flag. When enabled, requests with unknown or invalid Content-Type header are treated as remote write v1 instead of returning 415 Unsupported Media Type. Default is false. #7293
@@ -62,6 +70,7 @@
6270
* [BUGFIX] Distributor: Return remote write V2 stats headers properly when the request is HA deduplicated. #7240
6371
* [BUGFIX] Cache: Fix Redis Cluster EXECABORT error in MSet by using individual SET commands instead of transactions for cluster mode. #7262
6472
* [BUGFIX] Distributor: Fix an `index out of range` panic in PRW2.0 handler caused by dirty metadata when reusing requests from `sync.Pool`. #7299
73+
* [BUGFIX] Distributor: Fix data corruption in the push handler caused by shallow copying `Samples` and `Histograms` when converting Remote Write V2 requests to V1. #7337
6574

6675

6776
## 1.20.1 2025-12-03

RELEASE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Our goal is to provide a new minor release every 6 weeks. This is a new process
3636
| v1.18.0 | 2024-08-16 | Daniel Blando (@danielblando) |
3737
| v1.19.0 | 2025-01-22 | Charlie Le (@charlietle) |
3838
| v1.20.0 | 2025-10-31 | Ben Ye (@yeya24) |
39+
| v1.21.0 | 2026-03-09 | Friedrich Gonzalez (@friedrichg) |
3940

4041
## Release shepherd responsibilities
4142

build-image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.25.5-trixie
1+
FROM golang:1.25.8-trixie
22
ARG goproxyValue
33
ENV GOPROXY=${goproxyValue}
44
RUN apt-get update && apt-get install -y curl file gettext jq unzip protobuf-compiler libprotobuf-dev && \

docs/api/_index.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ Prometheus-compatible rules endpoint to list alerting and recording rules that a
541541

542542
_For more information, please check out the Prometheus [rules](https://prometheus.io/docs/prometheus/latest/querying/api/#rules) documentation._
543543

544-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.ruler.enable-api` CLI flag (or its respective YAML config option)._
544+
_This endpoint is disabled by default and can be enabled via the `-ruler.enable-api` CLI flag (or its respective YAML config option)._
545545

546546
_Requires [authentication](#authentication)._
547547

@@ -558,7 +558,7 @@ Prometheus-compatible rules endpoint to list of all active alerts.
558558

559559
_For more information, please check out the Prometheus [alerts](https://prometheus.io/docs/prometheus/latest/querying/api/#alerts) documentation._
560560

561-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.ruler.enable-api` CLI flag (or its respective YAML config option)._
561+
_This endpoint is disabled by default and can be enabled via the `-ruler.enable-api` CLI flag (or its respective YAML config option)._
562562

563563
_Requires [authentication](#authentication)._
564564

@@ -573,7 +573,7 @@ GET <legacy-http-prefix>/rules
573573

574574
List all rules configured for the authenticated tenant. This endpoint returns a YAML dictionary with all the rule groups for each namespace and `200` status code on success.
575575

576-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.ruler.enable-api` CLI flag (or its respective YAML config option)._
576+
_This endpoint is disabled by default and can be enabled via the `-ruler.enable-api` CLI flag (or its respective YAML config option)._
577577

578578
_Requires [authentication](#authentication)._
579579

@@ -632,7 +632,7 @@ GET <legacy-http-prefix>/rules/{namespace}
632632

633633
Returns the rule groups defined for a given namespace.
634634

635-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.ruler.enable-api` CLI flag (or its respective YAML config option)._
635+
_This endpoint is disabled by default and can be enabled via the `-ruler.enable-api` CLI flag (or its respective YAML config option)._
636636

637637
_Requires [authentication](#authentication)._
638638

@@ -664,7 +664,7 @@ GET <legacy-http-prefix>/rules/{namespace}/{groupName}
664664

665665
Returns the rule group matching the request namespace and group name.
666666

667-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.ruler.enable-api` CLI flag (or its respective YAML config option)._
667+
_This endpoint is disabled by default and can be enabled via the `-ruler.enable-api` CLI flag (or its respective YAML config option)._
668668

669669
_Requires [authentication](#authentication)._
670670

@@ -679,7 +679,7 @@ POST <legacy-http-prefix>/rules/{namespace}
679679

680680
Creates or updates a rule group. This endpoint expects a request with `Content-Type: application/yaml` header and the rules **YAML** definition in the request body, and returns `202` on success.
681681

682-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.ruler.enable-api` CLI flag (or its respective YAML config option)._
682+
_This endpoint is disabled by default and can be enabled via the `-ruler.enable-api` CLI flag (or its respective YAML config option)._
683683

684684
_Requires [authentication](#authentication)._
685685

@@ -716,7 +716,7 @@ DELETE <legacy-http-prefix>/rules/{namespace}/{groupName}
716716

717717
Deletes a rule group by namespace and group name. This endpoints returns `202` on success.
718718

719-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.ruler.enable-api` CLI flag (or its respective YAML config option)._
719+
_This endpoint is disabled by default and can be enabled via the `-ruler.enable-api` CLI flag (or its respective YAML config option)._
720720

721721
_Requires [authentication](#authentication)._
722722

@@ -731,7 +731,7 @@ DELETE <legacy-http-prefix>/rules/{namespace}
731731

732732
Deletes all the rule groups in a namespace (including the namespace itself). This endpoint returns `202` on success.
733733

734-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.ruler.enable-api` CLI flag (or its respective YAML config option)._
734+
_This endpoint is disabled by default and can be enabled via the `-ruler.enable-api` CLI flag (or its respective YAML config option)._
735735

736736
_Requires [authentication](#authentication)._
737737

@@ -743,7 +743,7 @@ POST /ruler/delete_tenant_config
743743

744744
This deletes all rule groups for tenant, and returns `200` on success. Calling endpoint when no rule groups exist for user returns `200`. Authentication is only to identify the tenant.
745745

746-
This is intended as internal API, and not to be exposed to users. This endpoint is enabled regardless of whether `-experimental.ruler.enable-api` is enabled or not.
746+
This is intended as internal API, and not to be exposed to users. This endpoint is enabled regardless of whether `-ruler.enable-api` is enabled or not.
747747

748748
_Requires [authentication](#authentication)._
749749

@@ -796,7 +796,7 @@ POST /multitenant_alertmanager/delete_tenant_config
796796
```
797797

798798
This endpoint deletes configuration for a tenant identified by `X-Scope-OrgID` header.
799-
It is internal, available even if Alertmanager API is not enabled by using `-experimental.alertmanager.enable-api`.
799+
It is internal, available even if Alertmanager API is not enabled by using `-alertmanager.enable-api`.
800800
The endpoint returns a status code of `200` if the user's configuration has been deleted, or it didn't exist in the first place.
801801

802802
_Requires [authentication](#authentication)._
@@ -811,7 +811,7 @@ Get the current Alertmanager configuration for the authenticated tenant, reading
811811

812812
This endpoint doesn't accept any URL query parameter and returns `200` on success.
813813

814-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.alertmanager.enable-api` CLI flag (or its respective YAML config option)._
814+
_This endpoint is disabled by default and can be enabled via the `-alertmanager.enable-api` CLI flag (or its respective YAML config option)._
815815

816816
_Requires [authentication](#authentication)._
817817

@@ -825,7 +825,7 @@ Stores or updates the Alertmanager configuration for the authenticated tenant. T
825825

826826
This endpoint expects the Alertmanager **YAML** configuration in the request body and returns `201` on success.
827827

828-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.alertmanager.enable-api` CLI flag (or its respective YAML config option)._
828+
_This endpoint is disabled by default and can be enabled via the `-alertmanager.enable-api` CLI flag (or its respective YAML config option)._
829829

830830
_Requires [authentication](#authentication)._
831831

@@ -863,7 +863,7 @@ Deletes the Alertmanager configuration for the authenticated tenant.
863863

864864
This endpoint doesn't accept any URL query parameter and returns `200` on success.
865865

866-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.alertmanager.enable-api` CLI flag (or its respective YAML config option)._
866+
_This endpoint is disabled by default and can be enabled via the `-alertmanager.enable-api` CLI flag (or its respective YAML config option)._
867867

868868
_Requires [authentication](#authentication)._
869869

docs/configuration/config-file-reference.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ cluster:
610610
# CLI flag: -alertmanager.cluster.push-pull-interval
611611
[push_pull_interval: <duration> | default = 1m]
612612
613-
# Enable the experimental alertmanager config api.
613+
# Deprecated: Use -alertmanager.enable-api instead.
614614
# CLI flag: -experimental.alertmanager.enable-api
615615
[enable_api: <boolean> | default = false]
616616
@@ -3342,6 +3342,10 @@ otlp:
33423342
# Deprecated: Use `-distributor.enable-type-and-unit-labels` flag instead.
33433343
# CLI flag: -distributor.otlp.enable-type-and-unit-labels
33443344
[enable_type_and_unit_labels: <boolean> | default = false]
3345+
3346+
# If true, suffixes will be added to the metrics for name normalization.
3347+
# CLI flag: -distributor.otlp.add-metric-suffixes
3348+
[add_metric_suffixes: <boolean> | default = true]
33453349
```
33463350
33473351
### `etcd_config`
@@ -5604,7 +5608,7 @@ ring:
56045608
[flush_period: <duration> | default = 1m]
56055609

56065610
# Enable the ruler api
5607-
# CLI flag: -experimental.ruler.enable-api
5611+
# CLI flag: -ruler.enable-api
56085612
[enable_api: <boolean> | default = false]
56095613

56105614
# EXPERIMENTAL: Remove duplicate rules in the prometheus rules and alerts API

docs/configuration/v1-guarantees.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ Currently experimental features are:
3939
- Evaluate rules to query frontend instead of ingesters (enabled via `-ruler.frontend-address`).
4040
- When `-ruler.frontend-address` is specified, the response format can be specified (via `-ruler.query-response-format`).
4141
- S3 Server Side Encryption (SSE) using KMS (including per-tenant KMS config overrides).
42-
- Ruler API (to PUT rules).
4342
- Alertmanager:
44-
- API (enabled via `-experimental.alertmanager.enable-api`)
45-
- Sharding of tenants across multiple instances (enabled via `-alertmanager.sharding-enabled`)
4643
- Receiver integrations firewall (configured via `-alertmanager.receivers-firewall.*`)
4744
- gRPC Store.
4845
- TLS configuration in gRPC and HTTP clients.

docs/getting-started/cortex-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ config:
147147
# -- Disable alertmanager gossip cluster by setting empty listen_address to empty string
148148
cluster:
149149
listen_address: '0.0.0.0:9094'
150-
# -- Enable the experimental alertmanager config api.
150+
# -- Enable the alertmanager config api.
151151
enable_api: true
152152
external_url: '/api/prom/alertmanager'
153153
frontend:

docs/guides/open-telemetry-collector.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ distributor:
7777
disable_target_info: <boolean>
7878
allow_delta_temporality: <boolean>
7979
enable_type_and_unit_labels: <boolean>
80+
add_metric_suffixes: <boolean>
8081
```
8182

8283
### Ingest `target_info` metric
@@ -156,3 +157,8 @@ overrides:
156157
promote_resource_attributes: ["attr1", "attr2"]
157158
`
158159
```
160+
161+
### Configure adding suffixes to metrics
162+
163+
The flag `add_metric_suffixes` allows control to add suffixes to the metrics for name normalization.
164+
This flag is enabled by default.

integration/configs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ var (
119119
"-api.response-compression-enabled": "true",
120120
"-ruler.enable-sharding": "false",
121121
"-ruler.poll-interval": "2s",
122-
"-experimental.ruler.enable-api": "true",
122+
"-ruler.enable-api": "true",
123123
"-ruler-storage.backend": "s3",
124124
"-ruler-storage.s3.access-key-id": e2edb.MinioAccessKey,
125125
"-ruler-storage.s3.secret-access-key": e2edb.MinioSecretKey,

integration/e2e/service.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ func (s *ConcreteService) Stop() error {
162162

163163
s.Wait()
164164

165+
// Ensure the container is fully removed before returning. Even though
166+
// containers are started with --rm, Docker removes them asynchronously
167+
// after the process exits. Without this explicit removal, restarting a
168+
// container with the same name can fail with "name already in use".
169+
_, _ = RunCommandAndGetOutput("docker", "rm", "--force", s.containerName())
170+
165171
s.usedNetworkName = ""
166172

167173
return nil
@@ -181,6 +187,12 @@ func (s *ConcreteService) Kill() error {
181187

182188
s.Wait()
183189

190+
// Ensure the container is fully removed before returning. Even though
191+
// containers are started with --rm, Docker removes them asynchronously
192+
// after the process exits. Without this explicit removal, restarting a
193+
// container with the same name can fail with "name already in use".
194+
_, _ = RunCommandAndGetOutput("docker", "rm", "--force", s.containerName())
195+
184196
s.usedNetworkName = ""
185197

186198
return nil

0 commit comments

Comments
 (0)