Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into yuri/grpc-cluster-val…
Browse files Browse the repository at this point in the history
…idation
  • Loading branch information
duricanikolic committed Mar 7, 2025
2 parents fa9d0e4 + 769906a commit 7a47cd8
Show file tree
Hide file tree
Showing 103 changed files with 1,299 additions and 326 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

* [FEATURE] Ingester/Distributor: Add support for exporting cost attribution metrics (`cortex_ingester_attributed_active_series`, `cortex_distributor_received_attributed_samples_total`, and `cortex_discarded_attributed_samples_total`) with labels specified by customers to a custom Prometheus registry. This feature enables more flexible billing data tracking. #10269 #10702
* [FEATURE] Ruler: Added `/ruler/tenants` endpoints to list the discovered tenants with rule groups. #10738
* [FEATURE] Distributor: Add experimental Influx handler. #10153
* [CHANGE] Querier: pass context to queryable `IsApplicable` hook. #10451
* [CHANGE] Distributor: OTLP and push handler replace all non-UTF8 characters with the unicode replacement character `\uFFFD` in error messages before propagating them. #10236
* [CHANGE] Querier: pass query matchers to queryable `IsApplicable` hook. #10256
Expand All @@ -17,7 +18,7 @@
* [CHANGE] Ruler: Add `user` and `reason` labels to `cortex_ruler_write_requests_failed_total` and `cortex_ruler_queries_failed_total`; add `user` to
`cortex_ruler_write_requests_total` and `cortex_ruler_queries_total` metrics. #10536
* [CHANGE] Querier / Query-frontend: Remove experimental `-querier.promql-experimental-functions-enabled` and `-query-frontend.block-promql-experimental-functions` CLI flags and respective YAML configuration options to enable experimental PromQL functions. Instead access to experimental PromQL functions is always blocked. You can enable them using the per-tenant setting `enabled_promql_experimental_functions`. #10660 #10712
* [FEATURE] Distributor: Add experimental Influx handler. #10153
* [CHANGE] Store-gateway: Include posting sampling rate in sparse index headers. When the sampling rate isn't set in a sparse index header, store gateway will rebuild the sparse header with the configured `blocks-storage.bucket-store.posting-offsets-in-mem-sampling` value. If the sparse header's sampling rate is set, but doesn't match the configured rate, store gateway will either rebuild the sparse header or downsample to the configured sampling rate. #10684
* [ENHANCEMENT] Compactor: Expose `cortex_bucket_index_last_successful_update_timestamp_seconds` for all tenants assigned to the compactor before starting the block cleanup job. #10569
* [ENHANCEMENT] Query Frontend: Return server-side `samples_processed` statistics. #10103
* [ENHANCEMENT] Distributor: OTLP receiver now converts also metric metadata. See also https://github.com/prometheus/prometheus/pull/15416. #10168
Expand Down Expand Up @@ -64,6 +65,7 @@
* [ENHANCEMENT] All: Add `cortex_client_request_invalid_cluster_validation_labels_total` metrics, that is used by Mimir's gRPC clients to track invalid cluster validations. #10767
* [ENHANCEMENT] Ingester client: Add support to configure cluster validation for ingester clients. Failed cluster validations are tracked by `cortex_client_request_invalid_cluster_validation_labels_total` with label `client=ingester`. #10767
* [ENHANCEMENT] Add experimental metric `cortex_distributor_dropped_native_histograms_total` to measure native histograms silently dropped when native histograms are disabled for a tenant. #10760
* [ENCHACEMENT] Compactor: Add experimental `-compactor.upload-sparse-index-headers` option. When enabled, the compactor will attempt to upload sparse index headers to object storage. This prevents latency spikes after adding store-gateway replicas. #10684
* [BUGFIX] Distributor: Use a boolean to track changes while merging the ReplicaDesc components, rather than comparing the objects directly. #10185
* [BUGFIX] Querier: fix timeout responding to query-frontend when response size is very close to `-querier.frontend-client.grpc-max-send-msg-size`. #10154
* [BUGFIX] Query-frontend and querier: show warning/info annotations in some cases where they were missing (if a lazy querier was used). #10277
Expand All @@ -84,6 +86,7 @@
* [BUGFIX] Distributor: Report partially converted OTLP requests with status 400 Bad Request. #10588
* [BUGFIX] Ruler: fix issue where rule evaluations could be missed while shutting down a ruler instance if that instance owns many rule groups. prometheus/prometheus#15804 #10762
* [BUGFIX] Ingester: Add additional check on reactive limiter queue sizes. #10722
* [BUGFIX] TSDB: fix unknown series errors and possible lost data during WAL replay when series are removed from the head due to inactivity and reappear before the next WAL checkpoint. https://github.com/prometheus/prometheus/pull/16060 #10824

### Mixin

Expand Down
11 changes: 11 additions & 0 deletions cmd/mimir/config-descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -11723,6 +11723,17 @@
"fieldFlag": "compactor.max-lookback",
"fieldType": "duration",
"fieldCategory": "experimental"
},
{
"kind": "field",
"name": "upload_sparse_index_headers",
"required": false,
"desc": "If enabled, the compactor constructs and uploads sparse index headers to object storage during each compaction cycle. This allows store-gateway instances to use the sparse headers from object storage instead of recreating them locally.",
"fieldValue": null,
"fieldDefaultValue": false,
"fieldFlag": "compactor.upload-sparse-index-headers",
"fieldType": "boolean",
"fieldCategory": "experimental"
}
],
"fieldValue": null,
Expand Down
2 changes: 2 additions & 0 deletions cmd/mimir/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,8 @@ Usage of ./cmd/mimir/mimir:
Number of symbols flushers used when doing split compaction. (default 1)
-compactor.tenant-cleanup-delay duration
For tenants marked for deletion, this is the time between deletion of the last block, and doing final cleanup (marker files, debug files) of the tenant. (default 6h0m0s)
-compactor.upload-sparse-index-headers
[experimental] If enabled, the compactor constructs and uploads sparse index headers to object storage during each compaction cycle. This allows store-gateway instances to use the sparse headers from object storage instead of recreating them locally.
-config.expand-env
Expands ${var} or $var in config according to the values of the environment variables.
-config.file value
Expand Down
2 changes: 2 additions & 0 deletions docs/sources/mimir/configure/about-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ The following features are currently experimental:
- `-compactor.in-memory-tenant-meta-cache-size`
- Limit blocks processed in each compaction cycle. Blocks uploaded prior to the maximum lookback aren't processed.
- `-compactor.max-lookback`
- Enable the compactor to upload sparse index headers to object storage during compaction cycles.
- `-compactor.upload-sparse-index-headers`
- Ruler
- Aligning of evaluation timestamp on interval (`align_evaluation_time_on_interval`)
- Allow defining limits on the maximum number of rules allowed in a rule group by namespace and the maximum number of rule groups by namespace. If set, this supersedes the `-ruler.max-rules-per-rule-group` and `-ruler.max-rule-groups-per-tenant` limits.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4997,6 +4997,13 @@ sharding_ring:
# blocks are considered regardless of their upload time.
# CLI flag: -compactor.max-lookback
[max_lookback: <duration> | default = 0s]

# (experimental) If enabled, the compactor constructs and uploads sparse index
# headers to object storage during each compaction cycle. This allows
# store-gateway instances to use the sparse headers from object storage instead
# of recreating them locally.
# CLI flag: -compactor.upload-sparse-index-headers
[upload_sparse_index_headers: <boolean> | default = false]
```
### store_gateway
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20250305224633-8c45fc54920d
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20250306234455-f6f6f2cceada

// Replace memberlist with our fork which includes some fixes that haven't been
// merged upstream yet:
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1284,8 +1284,8 @@ github.com/grafana/gomemcache v0.0.0-20250228145437-da7b95fd2ac1 h1:vR5nELq+KtGO
github.com/grafana/gomemcache v0.0.0-20250228145437-da7b95fd2ac1/go.mod h1:j/s0jkda4UXTemDs7Pgw/vMT06alWc42CHisvYac0qw=
github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe h1:yIXAAbLswn7VNWBIvM71O2QsgfgW9fRXZNR0DXe6pDU=
github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/grafana/mimir-prometheus v0.0.0-20250305224633-8c45fc54920d h1:ff6cIM9Z2ew3nbXVjwEttZFdIEAe6X1lMfMc+xCIjKM=
github.com/grafana/mimir-prometheus v0.0.0-20250305224633-8c45fc54920d/go.mod h1:jC5V3PuoN3nxpvsvZipB+iOf6H/Np1uW+e3r9TTxJMA=
github.com/grafana/mimir-prometheus v0.0.0-20250306234455-f6f6f2cceada h1:8MLoP1fblwE72Bk4G66nmhXwoHDcpHQcfjrC+kLoXAg=
github.com/grafana/mimir-prometheus v0.0.0-20250306234455-f6f6f2cceada/go.mod h1:jC5V3PuoN3nxpvsvZipB+iOf6H/Np1uW+e3r9TTxJMA=
github.com/grafana/opentracing-contrib-go-stdlib v0.0.0-20230509071955-f410e79da956 h1:em1oddjXL8c1tL0iFdtVtPloq2hRPen2MJQKoAWpxu0=
github.com/grafana/opentracing-contrib-go-stdlib v0.0.0-20230509071955-f410e79da956/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU=
github.com/grafana/prometheus-alertmanager v0.25.1-0.20250211112812-e32be5e2a455 h1:yidC1xzk4fedLZ/iXEqSJopkw3jPZPwoMqqzue4eFEA=
Expand Down
1 change: 1 addition & 0 deletions operations/helm/charts/mimir-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Entries should include a reference to the Pull Request that introduced the chang
* [ENHANCEMENT] Individual mimir components can override their container images via the *.image values. The component's image definitions always override the values set in global `image` or `enterprise.image`. #10340
* [ENHANCEMENT] Alertmanager, compactor, ingester, and store-gateway StatefulSets can configure their PVC template name via the corresponding *.persistentVolume.name values. #10376
* [ENHANCEMENT] Set resources for smoke-test job. #10608
* [ENHANCEMENT] All components can expose additional ports with their respective services via the *.service.extraPorts values. This allows exposing the containers that components declare in `extraContainers`. #10659
* [BUGFIX] Create proper in-cluster remote URLs when gateway and nginx are disabled. #10625
* [BUGFIX] Fix calculation of `mimir.siToBytes` and use floating point arithmetics. #10044

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.admin_api.service.extraPorts }}
{{- toYaml .Values.admin_api.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "admin-api" "memberlist" true) | nindent 4 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ spec:
- port: {{ $clusterPort }}
protocol: TCP
name: cluster
{{- if .Values.alertmanager.service.extraPorts }}
{{- toYaml .Values.alertmanager.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "alertmanager" "memberlist" true) | nindent 4 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.alertmanager.service.extraPorts }}
{{- toYaml .Values.alertmanager.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" $args | nindent 4 }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.compactor.service.extraPorts }}
{{- toYaml .Values.compactor.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "compactor" "memberlist" true) | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
protocol: TCP
name: http-metrics
targetPort: http-metrics
{{- if .Values.continuous_test.service.extraPorts }}
{{- toYaml .Values.continuous_test.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "continuous-test") | nindent 4 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.distributor.service.extraPorts }}
{{- toYaml .Values.distributor.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "distributor" "memberlist" true) | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.distributor.service.extraPorts }}
{{- toYaml .Values.distributor.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "distributor" "memberlist" true) | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.federation_frontend.service.extraPorts }}
{{- toYaml .Values.federation_frontend.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "federation-frontend") | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ spec:
name: legacy-http-metrics
targetPort: http-metrics
{{- end }}
{{- if .Values.gateway.service.extraPorts }}
{{- toYaml .Values.gateway.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" $ "component" "gateway") | nindent 4 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.graphite.querier.service.extraPorts }}
{{- toYaml .Values.graphite.querier.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "graphite-querier") | nindent 4 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.graphite.write_proxy.service.extraPorts }}
{{- toYaml .Values.graphite.write_proxy.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "graphite-write-proxy") | nindent 4 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.ingester.service.extraPorts }}
{{- toYaml .Values.ingester.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "ingester" "memberlist" true) | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.ingester.service.extraPorts }}
{{- toYaml .Values.ingester.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" $args | nindent 4 }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ spec:
port: 9150
targetPort: 9150
{{ end }}
{{- if .service.extraPorts }}
{{- toYaml .service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" $.ctx "component" $.component) | nindent 4 }}
{{- end -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ spec:
nodePort: {{ .Values.nginx.service.nodePort }}
{{- end }}
protocol: TCP
{{- if .Values.nginx.service.extraPorts }}
{{- toYaml .Values.nginx.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "nginx") | nindent 4 }}
{{- end -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.overrides_exporter.service.extraPorts }}
{{- toYaml .Values.overrides_exporter.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "overrides-exporter") | nindent 4 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.querier.service.extraPorts }}
{{- toYaml .Values.querier.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "querier" "memberlist" true) | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.query_frontend.service.extraPorts }}
{{- toYaml .Values.query_frontend.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "query-frontend") | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.query_frontend.service.extraPorts }}
{{- toYaml .Values.query_frontend.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "query-frontend") | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.query_scheduler.service.extraPorts }}
{{- toYaml .Values.query_scheduler.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "query-scheduler") | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.query_scheduler.service.extraPorts }}
{{- toYaml .Values.query_scheduler.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "query-scheduler") | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.ruler_querier.service.extraPorts }}
{{- toYaml .Values.ruler_querier.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler-querier" "memberlist" true) | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.ruler_query_frontend.service.extraPorts }}
{{- toYaml .Values.ruler_query_frontend.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler-query-frontend") | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.ruler_query_scheduler.service.extraPorts }}
{{- toYaml .Values.ruler_query_scheduler.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.ruler_query_scheduler.service.extraPorts }}
{{- toYaml .Values.ruler_query_scheduler.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ spec:
protocol: TCP
name: http-metrics
targetPort: http-metrics
{{- if .Values.ruler.service.extraPorts }}
{{- toYaml .Values.ruler.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler" "memberlist" true) | nindent 4 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.store_gateway.service.extraPorts }}
{{- toYaml .Values.store_gateway.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "store-gateway" "memberlist" true) | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ spec:
protocol: TCP
name: grpc
targetPort: grpc
{{- if .Values.store_gateway.service.extraPorts }}
{{- toYaml .Values.store_gateway.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mimir.selectorLabels" $args | nindent 4 }}

Expand Down
Loading

0 comments on commit 7a47cd8

Please sign in to comment.