This is the first release candidate for v1.22.0.
Images are published for cortex, query-tee, test-exporter and thanosconvert:
docker pull quay.io/cortexproject/cortex:v1.22.0-rc.0
Changelog
- [CHANGE] Ruler: Remove the deprecated
-ruler.evaluation-delay-durationflag and itsruler_evaluation_delay_durationper-tenant limit. Use-ruler.query-offset/ruler_query_offset, which no longer takes the higher of the two values. Cortex decodes the runtime config strictly, so a leftoverruler_evaluation_delay_durationoverride makes the runtime config fail to load: Cortex exits at startup (module failed,module=runtime-config), and on an already-running process every reload fails, pinning the last good overrides and droppingcortex_runtime_config_last_reload_successfulto 0. Rungrep -r ruler_evaluation_delay_durationover your runtime configs before upgrading. #7792 - [CHANGE] Remove the deprecated
-<prefix>.fifocache.sizeflag and itssizeYAML field (deprecated in 1.1.0). Use-<prefix>.fifocache.max-size-itemsor-<prefix>.fifocache.max-size-bytes; a cache configured only viasizenow starts with no capacity. #7791 - [CHANGE] Querier: Remove the deprecated
-querier.ingester-metadata-streamingflag and itsingester_metadata_streamingYAML field (deprecated in 1.18.0, defaulttrue). Streaming RPCs are now always used for the metadata APIs. Also removes the dead hiddeningester_streamingYAML field left over from-querier.ingester-streaming. #7791 - [CHANGE] Remove deprecated CLI flags that have been no-ops for at least two minor releases. All of them were flag-only (no YAML config option) and already had no effect, so the only impact is that passing them now fails at startup. Remove them from your command lines before upgrading. #7790
-querier.ingester-streaming(deprecated in 1.17.0)-querier.iterators(deprecated in 1.17.0)-querier.batch-iterators(deprecated in 1.17.0)-querier.query-store-for-labels-enabled(deprecated in 1.18.0)-querier.max-outstanding-requests-per-tenant(deprecated in 1.18.0; use-frontend.max-outstanding-requests-per-tenant)-query-scheduler.max-outstanding-requests-per-tenant(deprecated in 1.18.0; use-frontend.max-outstanding-requests-per-tenant)-blocks-storage.tsdb.wal-compression-enabled(deprecated in 1.19.0; use-blocks-storage.tsdb.wal-compression-type)-ingester.max-series-per-query(a chunks-storage limit, ignored since blocks storage; use-querier.max-fetched-series-per-query)
- [CHANGE] Ingester: Formally deprecate
-blocks-storage.tsdb.max-exemplars, scheduled for removal in v1.24.0. Use the per-tenantmax_exemplarslimit instead. The flag still works as the global fallback whenmax_exemplarsis 0, but setting it now logs a warning and incrementsdeprecated_flags_inuse_total. #7793 - [CHANGE] Ingester: Graduate native histogram ingestion (
-blocks-storage.tsdb.enable-native-histograms) from experimental. #7789 - [CHANGE] Querier: Make query time range configurations per-tenant:
query_ingesters_within,query_store_after, andshuffle_sharding_ingesters_lookback_period. Usesmodel.Durationinstead oftime.Durationto support serialization but has minimum unit of 1ms (nanoseconds/microseconds not supported). #7160 #7323 - [CHANGE] Alertmanager: Remove the obsolete startup migration of local state files into per-tenant directories (scheduled for removal in 1.11.0). Upgrading from a release older than 1.9.0 with a persisted local state directory now requires upgrading to an intermediate release first, so the migration can run. #7513
- [CHANGE] Cache: Setting
-blocks-storage.bucket-store.metadata-cache.bucket-index-content-ttlto 0 will disable the bucket-index cache. #7446 - [CHANGE] HA Tracker: Move
-distributor.ha-tracker.failover-timeoutfrom a global config to a per-tenant runtime config. The flag name and default value (30s) remain the same. #7481 - [FEATURE] Parquet: Support sharded parquet file conversion and querying. #7610
- [FEATURE] Parquet Converter: Add experimental
-parquet-converter.max-num-columnsflag to automatically shard parquet files when the number of columns exceeds the configured limit. This prevents failures when a TSDB block has more unique label names than the parquet library's column limit (32767). #7624 - [FEATURE] Distributor: Add experimental
-distributor.num-query-workersflag to use a goroutine worker pool for query fan-out calls to ingesters. Reuses pre-grown goroutine stacks to eliminate theruntime.copystackoverhead (~8% CPU) observed on rulers with wide ingester fan-out. Falls back to spawning a new goroutine when no worker is available. #7623 - [FEATURE] Ingester: Add experimental active series tracker that counts active series by configurable label matchers (including regex) per tenant and exposes
cortex_ingester_active_series_per_trackermetric. Configured viaactive_series_trackersin runtime config overrides. #7476 - [FEATURE] Ingester: Add experimental head-only queried series metric.
cortex_ingester_queried_head_seriestracks unique series queried from head via HLL. Enabled via-ingester.head-queried-series-metrics-enabled. #7500 - [FEATURE] Ruler: Add per-tenant
ruler_alert_generator_url_templateruntime config option to customize alert generator URLs using Go templates. Includes ajsonEscapetemplate function for safely embedding expressions in JSON-encoded URL parameters (e.g., Grafana Explore panes). Supports Grafana Explore, Perses, and other UIs. #7302 #7458 - [FEATURE] Distributor: Add experimental
-distributor.enable-start-timestampflag for Prometheus Remote Write 2.0. When enabled,StartTimestamp (ST)is ingested. #7371 - [FEATURE] Memberlist: Add
-memberlist.cluster-labeland-memberlist.cluster-label-verification-disabledto prevent accidental cross-cluster gossip joins and support rolling label rollout. #7385 - [FEATURE] Querier: Add timeout classification to classify query timeouts as 4XX (user error) or 5XX (system error) based on phase timing. When enabled, queries that spend most of their time in PromQL evaluation return
422 Unprocessable Entityinstead of503 Service Unavailable. #7374 - [FEATURE] Querier: Implement Resource Based Throttling in Querier. #7442
- [FEATURE] Querier: Add resource-based query eviction that automatically cancels the heaviest running query when CPU or heap utilization exceeds configured thresholds. #7488
- [FEATURE] Storage: Add support for Oracle Cloud Infrastructure (OCI) Object Storage as a backend for blocks, ruler, and alertmanager storage. Configured via
-<prefix>.oci.*flags withbackend: oci. #7718 - [FEATURE] StoreGateway: Add experimental optional limit
blocks-storage.bucket-store.max-concurrent-data-byteson the data bytes (postings, series and chunks) fetched via the Series() API call and processed concurrently across all queries per store gateway to protect from oomkill. This returns an error that is retryable at querier level. #7271 - [FEATURE] Engine: Add
-querier.selector-batch-sizeand-ruler.selector-batch-sizeflags to configure series batching in the Thanos promQL engine. 0 disables batching. #7763 - [ENHANCEMENT] Upgrade prometheus alertmanager version to v0.32.1. #7462
- [ENHANCEMENT] Tenant Federation: Avoid purging the regex resolver LRU cache on user-sync ticks when the set of known users has not changed. #7489
- [ENHANCEMENT] Parquet Converter: Add
parquet-converter.max-block-label-nameslimit to skip conversion of TSDB blocks with too many label names. #7625 - [ENHANCEMENT] Parquet Converter: Add a ring status page to expose the ring status. #7455
- [ENHANCEMENT] Parquet: Add
-blocks-storage.bucket-store.parquet-query-concurrencyflag to configure the maximum number of concurrent goroutines applied at each level of parquet query processing in store-gateway: shard querying, row group processing, and column materialization. #7613 - [ENHANCEMENT] Parquet: Add a row ranges cache for parquet query filtering in querier and store-gateway. #7478
- [ENHANCEMENT] Ingester: Add
cortex_ingester_ingestion_delay_secondsnative histogram metric to track the delay between sample ingestion time and sample timestamp. #7443 - [ENHANCEMENT] Ingester: Add WAL record metrics to help evaluate the effectiveness of WAL compression type (e.g. snappy, zstd):
cortex_ingester_tsdb_wal_record_part_writes_total,cortex_ingester_tsdb_wal_record_parts_bytes_written_total, andcortex_ingester_tsdb_wal_record_bytes_saved_total. #7420 - [ENHANCEMENT] Distributor: Introduce dynamic
Symbolsslice capacity pooling. #7398 #7401 - [ENHANCEMENT] Metrics Helper: Add native histogram support for aggregating and merging, including dual-format histogram handling that exposes both native and classic bucket formats. #7359
- [ENHANCEMENT] Cache: Add per-tenant TTL configuration for query results cache to control cache expiration on a per-tenant basis with separate TTLs for regular and out-of-order data.
-frontend.out-of-order-results-cache-ttlfalls back to-frontend.results-cache-ttlwhen unset, and then to the global cache backend TTL. #7357 #7775 - [ENHANCEMENT] Update build image and Go version to 1.26. #7434 #7437 #7716 #7726
- [ENHANCEMENT] Upgraded container base images from
alpine:3.23togcr.io/distroless/static-debian12, reducing image size and attack surface. #7637 - [ENHANCEMENT] Query Scheduler: Add
cortex_query_scheduler_tracked_requestsmetric to track the current number of requests held by the scheduler. #7355 - [ENHANCEMENT] Compactor: Prevent partition compaction to compact any blocks marked for deletion. #7391
- [ENHANCEMENT] Distributor: Optimize memory allocations by reusing the existing capacity of these pooled slices in the Prometheus Remote Write 2.0 path. #7392
- [ENHANCEMENT] Upgrade gRPC from v1.71.2 to v1.79.3 to address CVE-2026-33186. #7460 #7463
- [ENHANCEMENT] Query Frontend: Add
query_too_expensivereason to QFE andreasonfield to query stats. #7479 - [ENHANCEMENT] Instrument Ingester CPU profile with source for read APIs. #7494
- [ENHANCEMENT] Ingester: Convert expanded postings cache from FIFO to LRU eviction to retain frequently-queried entries under memory pressure. #7510
- [ENHANCEMENT] Querier: Detach series label and chunk data from gRPC unmarshal buffers in store-gateway streaming path, allowing the Go GC to reclaim receive buffers. #7519
- [ENHANCEMENT] Distributor: Added
cortex_distributor_received_histogram_bucketsmetric to track number of buckets in received native histogram samples before validation, per user. #7569 - [ENHANCEMENT] Ingester: Add lazy regex evaluation on head postings cache miss. Defers expensive regex matchers on high-cardinality labels to per-series filtering when a selective equality matcher already narrows the result set. Configured via
-blocks-storage.expanded_postings_cache.head.lazy-matcher-max-cardinality(disabled by default). #7553 - [ENHANCEMENT] Store Gateway: Resolve the parquet shard count from the bucket index instead of reading the converter mark for each block, reducing object storage calls when the bucket index is enabled. A
componentlabel is added to the bucket index loader metrics to distinguish store-queryable and store-gateway. #7648 - [ENHANCEMENT] Query Frontend: Improve the slow query log with
source,user_agent,engine_type,block_store_type, and query stats fields to aid slow query diagnosis. #7601 - [ENHANCEMENT] Ring: Add ring metric to count number of duplicate tokens. #7626
- [ENHANCEMENT] Upgrade prometheus version to v3.9.1. #7535
- [ENHANCEMENT] Metrics: Add native histogram support to all remaining production histograms, enabling dual-format (classic + native) exposition across all Cortex components. #7636
- [ENHANCEMENT] Ring: Cache
ShuffleShardWithLookbacksubrings. The cached entry is invalidated on topology change or oncenowreaches the earliestRegisteredTimestamp + lookbackPeriodof any included instance. #7628 - [ENHANCEMENT] Query Frontend: Rename
time_takenfield totime_taken_msand make it return millisecond count. #7649 - [ENHANCEMENT] Update prometheus alertmanager version to v0.33.0. #7647
- [ENHANCEMENT] Querier/Ingester: Detach ingester series from gRPC buffers to reduce heap. #7670
- [ENHANCEMENT] Ingester: Add
cortex_ingester_tsdb_head_max_timestampmetric that re-exports the TSDB head max timestamp (prometheus_tsdb_head_max_time) per user, to help investigate ingestion issues like out-of-bounds (too old sample) errors. #7694 - [ENHANCEMENT] Ingester: Include the TSDB head max time in the
out of boundsandtoo old sampleerror messages, so that users can see how far behind the accepted time range a rejected sample is. #7695 - [ENHANCEMENT] Compactor: Reduce object storage GET calls when updating the bucket index by skipping re-reading parquet converter markers for blocks that already have a valid-version parquet entry in the previous index. #7669
- [ENHANCEMENT] Upgrade Thanos and promql-engine to latest. #7505 #7691 #7740 #7788
- [ENHANCEMENT] Ruler: Adjust ruler frontend decoder to not wrap query error messages with execution prefix, this makes error responses consistent between internal and external ruler paths. #7741
- [ENHANCEMENT] Distributor: Deduplicate metric metadata when converting PRW 2.0 requests. PRW 2.0 attaches metadata to every series, so a metric family was previously expanded into one
MetricMetadataper series. #7760 - [ENHANCEMENT] Ingester: Add
cortex_ingester_head_metric_namesgauge exposing the number of unique metric names in the TSDB head per tenant. Registered when-ingester.active-series-metrics-enabledis true. #7514 - [ENHANCEMENT] Query Frontend: Log
X-Grafana-Userheader in query stats, slow query, and query request logs when Grafana'ssend_user_headeris enabled. #7799 - [ENHANCEMENT] Querier: Use non-pointer HistogramBucket slice in response codec. #7809
- [ENHANCEMENT] Update build image and Go version to 1.27.0. #7807 #7814
- [ENHANCEMENT] Querier: Reduce merge iterator
BatchSizefrom 12 to 8. #7823 - [BUGFIX] Querier: Fix queryWithRetry and labelsWithRetry returning (nil, nil) on cancelled context by propagating ctx.Err(). #7370
- [BUGFIX] Metrics Helper: Fix non-deterministic bucket order in merged histograms by sorting buckets after map iteration, matching Prometheus client library behavior. #7380
- [BUGFIX] Distributor: Return HTTP 401 Unauthorized when tenant ID resolution fails in the Prometheus Remote Write 2.0 path. #7389
- [BUGFIX] Packaging: Fix RPM and deb packages to install the binary to
/usr/bin, install the systemd unit to the correct system path (/usr/lib/systemd/systemfor RPM,/lib/systemd/systemfor deb), and mark the sysconfig/default env file as a config file so it is not overwritten on upgrade. #7445 - [BUGFIX] Compactor: Handle not-found and access-denied errors from
Attributes()in bucket index updater, preventing a stale cachedGet()from causing the entire cleanup cycle to fail whenmeta.jsonhas been deleted from object storage. #7454 - [BUGFIX] Compactor: Fix stale
cortex_bucket_index_last_successful_update_timestamp_secondsmetric not being cleaned up when tenant ownership changes due to ring rebalancing. This caused false alarms on bucket index update rate when a tenant moved between compactors. #7485 #7487 - [BUGFIX] Compactor: Fix flake in
TestCompactor_DeleteLocalSyncFilesandTestPartitionCompactor_DeleteLocalSyncFilesby polling on user ownership rather than just theCompactionRunsCompletedcounter, which increments even when the second compactor sees zero owned users due to a transient ring-view skew at startup. #7565 - [BUGFIX] Ingester: Close TSDB when compaction fails during
createTSDB, preventing resource leaks (file descriptors, mmap handles) that could lead to ingester instability. #7560 - [BUGFIX] Tenant Federation: Fix result cache returning stale data after a new tenant is added when
-tenant-federation.regex-matcher-enabled=true. The resolved tenant set is now hashed and included in the cache key so that any change to the matched tenant list automatically invalidates cached entries. Non-regex users are unaffected. #7562 - [BUGFIX] Tenant Federation: Fix regex resolver clearing known users list when user scan fails. #7534
- [BUGFIX] Ingester: Fix inflight query counter leak when resource-based query protection rejects a request. #7539
- [BUGFIX] Ingester: Release the TSDB appender on every early-return path in
Push(e.g. out-of-order label set) by deferringRollback. Previously such requests leaked TSDB head series references, mmap'd chunks and pending state per request, causing thecortex_ingester_tsdb_head_active_appendersgauge to grow unbounded. #7528 - [BUGFIX] Ingester: Fix
panic: send on closed channelinActiveQueriedSeriesServiceon shutdown by removing the redundant channel close instopping()and relying onctx.Done()to signal worker exit. #7533 - [BUGFIX] Ring: Fix ring token conflict resolution only applied to updated instance and make constantly token conflict check during instance observe period. #7554
- [BUGFIX] Ring: Fix
DoBatchnever running its cleanup callback when a per-instance callback panics.wg.Done()is now deferred, sowg.Wait()no longer blocks forever and the context timers and request buffers owned by the cleanup function are released. #7559 - [BUGFIX] Query Frontend: Fix native histogram responses not being handled correctly in
minTime()sort ordering for split_by_interval merge. #7555 - [BUGFIX] Compactor: Ensure visit marker heartbeat goroutine completes before blocks cleaner returns. #7386
- [BUGFIX] Querier: Fix unbounded resource leak in the bucket-scan blocks finder (used when the bucket index is disabled). Per-tenant metadata fetchers, their Prometheus registries, and on-disk meta caches are now evicted once a tenant is no longer active, instead of being retained for the lifetime of the process. #7573
- [BUGFIX] Alertmanager: Fix data race between ApplyConfig's dispatcher/inhibitor startup and Stop during config reload and shutdown, and reject lazy tenant creation after shutdown begins. #7618
- [BUGFIX] Distributor: Release the push worker pool goroutines on shutdown by stopping the async executor during the stopping phase when
-distributor.num-push-workersis set. #7602 - [BUGFIX] Query Frontend: Track data selection min and max time of query requests in query stats regardless of whether query priority and query rejection are enabled. #7724
- [BUGFIX] Querier: Fix flake in integration tests TestQuerierWithStoreGatewayDataBytesLimits and TestQuerierWithBlocksStorageLimits by waiting for the querier to see the store-gateway ACTIVE in the ring before querying. #7614
- [BUGFIX] Ruler: Register xfunctions (xincrease, xrate, xdelta) in the global parser before loading rule files. #7621
- [BUGFIX] Security: Reject empty entries in
-distributor.sign-write-requests-keyscaused by stray or trailing commas (e.g.newkey,). Previously these were silently accepted and produced an empty signing key, which downgraded HMAC stream-push authentication to a forgeable signature. Misconfigured flags now fail at process startup; audit your configs before upgrading. #7587 - [BUGFIX] Config: Fix validation of explicit zero values in non-empty YAML root sections, allowing configs such as
flusher: { exit_after_flush: false }while continuing to reject empty root sections. #7700 - [BUGFIX] Querier: Fix panic due to request tracker truncating multi-byte UTF-8 character #7640
- [BUGFIX] Ingester: Fix panic (
HistogramProtoToHistogram called with a float histogram) when ingesting a float native histogram with a zero count (e.g. a staleness marker or empty histogram). The decoder is now selected by histogram type viaIsFloatHistogram()instead of by count value. #7645 - [BUGFIX] Querier: Fix parquet queryable fallback returning a nil error instead of the actual query error in
LabelValuesandLabelNames. #7638 - [BUGFIX] Storage: Default the Azure
endpoint_suffixtoblob.core.windows.netinstead of empty. Cortex builds the Thanos Azure config directly and bypasses Thanos' default, so an unset suffix produced an invalid FQDN (<account>.) and components hung on startup with DNS errors. #5449 #7687 - [BUGFIX] Store Gateway: Fix misleading "no index cache backend addresses" validation error being reported for chunks-cache, metadata-cache, and parquet caches when their memcached or redis backend is configured without addresses. The message is now the cache-type-agnostic "no cache backend addresses". #7675
- [BUGFIX] Querier/Query Frontend: Fix DNS watcher dropping all query-frontend/scheduler worker connections on a transient DNS lookup failure. #7698
- [BUGFIX] Ring: Fix DynamoDB KV CAS not retrying on transactional conditional check failures.
TransactWriteItemsreports condition failures asTransactionCanceledExceptionwith aConditionalCheckFailedcancellation reason, which was not recognized as retryable, so any concurrent ring update conflict (e.g. many ingesters joining during a rolling update) failed immediately instead of re-reading and retrying.TransactionConflictcancellation reasons are also treated as retryable. #7706 - [BUGFIX] Distributor: Return HTTP 499 (Client Closed Request) instead of 500 when a remote-write or OTLP push is canceled by the client, so client-side cancellations are no longer counted as server-side errors. #7717
- [BUGFIX] Querier: Fix gRPC
codes.Cancelederrors being mapped to HTTP 500 instead of 499 when a client cancels a query. #7738 - [BUGFIX] Fix the gRPC DNS watcher's SRV record path deleting all known endpoints when the SRV query succeeds but every target's A record lookup fails. #7745
- [BUGFIX] Compactor: Fix spurious
bucket operation fail after retrieserror logs emitted during partial block cleanup. #7749 - [BUGFIX] Alertmanager: Fix panic in
validateAlertmanagerConfigwhen receiver config traversal encounters nil interface values. #7751 - [BUGFIX] Parquet Converter: Fix
auto_forget_delayhaving no effect. The ring lifecycler was created without the auto-forget delegate, so unhealthy instances were never automatically removed from the ring. #7752 - [BUGFIX] Compactor: Properly handle error from ReadPartitionedGroupInfo in UpdatePartitionedGroupInfo. #7766
- [BUGFIX] Alertmanager: Reject the global
mattermost_webhook_url_filesetting in per-tenant configs, consistent with every other global*_filesetting. #7768 - [BUGFIX] Alertmanager: Tighten per-tenant config validation to reject additional file-based settings. #7767
- [BUGFIX] Querier: Fix panic (
index out of range [-1]) in the active request tracker when truncating amatch[]/queryvalue made entirely of invalid UTF-8 continuation bytes. The backwards scan for a rune boundary now stops at index 0 instead of underflowing. #7743 - [BUGFIX] Config: Fix CSV-list flags/YAML fields (e.g.
-compactor.enabled-tenants) treating an explicitly empty string as a one-element list containing an empty tenant name instead of an empty list. #7714