Breaking changes20
Ruler evaluation-delay settings removed
AffectsCortex configurations using -ruler.evaluation-delay-duration or ruler_evaluation_delay_duration runtime overrides
Action requiredNo deprecated flag or limit, and no ruler_evaluation_delay_duration runtime override; replacements use -ruler.query-offset / ruler_query_offset.
A process started with the removed flag now fails at startup; a leftover runtime override makes startup fail or causes reloads on a running process to fail, retaining the last good overrides and setting cortex_runtime_config_last_reload_successful to 0. The query-offset values no longer use the higher of the two values.
Evidence“Cortex decodes the runtime config strictly, so a leftover `ruler_evaluation_delay_duration` override 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 dropping `cortex_runtime_config_last_reload_successful` to 0.” cortexproject/cortex/releases/tag/v1.22.0 ↗ Show release-note lines
- **Removed flags and stricter config checks**: Cortex removes the deprecated `-ruler.evaluation-delay-duration`, `-querier.ingester-metadata-streaming`, and `-<prefix>.fifocache.size` flags, and eight flags that already had no effect, such as `-querier.iterators`. Passing a removed flag stops Cortex at startup, and so does a leftover `ruler_evaluation_delay_duration` in a runtime config. `query_ingesters_within` must now be less than `-blocks-storage.tsdb.close-idle-tsdb-timeout`, and a config that sets them equal stops Cortex at startup. Read the `[CHANGE]` entries below before you upgrade.
github.com/cortexproject/cortex/releases/tag/v1.22.0FIFOCache size setting removed
AffectsFIFOCache configurations using -<prefix>.fifocache.size or the size YAML field
Action requiredConfiguration with -<prefix>.fifocache.max-size-items or -<prefix>.fifocache.max-size-bytes instead of only size
Caches configured only through size now start with no capacity.
Evidence“Remove the deprecated `-<prefix>.fifocache.size` flag and its `size` YAML field (deprecated in 1.1.0). Use `-<prefix>.fifocache.max-size-items` or `-<prefix>.fifocache.max-size-bytes`; a cache configured only via `size` now starts with no capacity.” cortexproject/cortex/releases/tag/v1.22.0 ↗ Show release-note lines
- **Removed flags and stricter config checks**: Cortex removes the deprecated `-ruler.evaluation-delay-duration`, `-querier.ingester-metadata-streaming`, and `-<prefix>.fifocache.size` flags, and eight flags that already had no effect, such as `-querier.iterators`. Passing a removed flag stops Cortex at startup, and so does a leftover `ruler_evaluation_delay_duration` in a runtime config. `query_ingesters_within` must now be less than `-blocks-storage.tsdb.close-idle-tsdb-timeout`, and a config that sets them equal stops Cortex at startup. Read the `[CHANGE]` entries below before you upgrade.
github.com/cortexproject/cortex/releases/tag/v1.22.0Ruler evaluation-delay settings replaced by query offset
AffectsRuler deployments using the removed flag or per-tenant runtime-config field
Action requiredA grep -r ruler_evaluation_delay_duration search across runtime configs before upgrading
Previously, the effective offset was the higher of the two settings; it now comes directly from RulerQueryOffset. A leftover ruler_evaluation_delay_duration override makes startup fail or each reload fail on a running process, which retains last-good overrides and sets cortex_runtime_config_last_reload_successful to 0.
Show release-note lines
* [CHANGE] Ruler: Remove the deprecated `-ruler.evaluation-delay-duration` flag and its `ruler_evaluation_delay_duration` per-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 leftover `ruler_evaluation_delay_duration` override 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 dropping `cortex_runtime_config_last_reload_successful` to 0. Run `grep -r ruler_evaluation_delay_duration` over your runtime configs before upgrading. #7792
github.com/cortexproject/cortex/releases/tag/v1.22.0FIFO cache capacity setting removed
Affectscaches configured with -<prefix>.fifocache.size or the size YAML field
Previously, size could set cache capacity. After removal, a cache configured only with that setting starts with no capacity and logs neither max-size-bytes nor max-size-items is set.
Evidence“NewFifoCache no longer copies it into `MaxSizeItems`, so a cache configured only through `size` now starts with no capacity (and already logs "neither max-size-bytes nor max-size-items is set").” cortexproject/cortex/pull/7791 ↗ Show release-note lines
* [CHANGE] Remove the deprecated `-<prefix>.fifocache.size` flag and its `size` YAML field (deprecated in 1.1.0). Use `-<prefix>.fifocache.max-size-items` or `-<prefix>.fifocache.max-size-bytes`; a cache configured only via `size` now starts with no capacity. #7791
github.com/cortexproject/cortex/releases/tag/v1.22.0Metadata APIs always use streaming RPCs
Affectsquerier setups using -querier.ingester-metadata-streaming, ingester_metadata_streaming, or ingester_streaming
Previously, -querier.ingester-metadata-streaming and ingester_metadata_streaming controlled metadata streaming and defaulted to true; the hidden ingester_streaming field was also accepted.
Show release-note lines
* [CHANGE] Querier: Remove the deprecated `-querier.ingester-metadata-streaming` flag and its `ingester_metadata_streaming` YAML field (deprecated in 1.18.0, default `true`). Streaming RPCs are now always used for the metadata APIs. Also removes the dead hidden `ingester_streaming` YAML field left over from `-querier.ingester-streaming`. #7791
github.com/cortexproject/cortex/releases/tag/v1.22.0Query Frontend slow-query log field renamed to time_taken_ms
AffectsQuery Frontend slow-query logging(Inferred)
Previously, the log used time_taken with a duration-string value such as 1s; it now uses time_taken_ms with a millisecond count such as 1000 for one second.
Evidence“Rename `time_taken` field to `time_taken_ms` and make it output millisecond count, so sorting and filtering on the field could be done.” cortexproject/cortex/pull/7649 ↗ Show release-note lines
* [ENHANCEMENT] Query Frontend: Rename `time_taken` field to `time_taken_ms` and make it return millisecond count. #7649
github.com/cortexproject/cortex/releases/tag/v1.22.0Partitioned group file overwrites on read errors fixed
Affectscompactor setups using partitioned group information
A transient ReadPartitionedGroupInfo error, such as S3 throttling, could be swallowed and allow an existing partitioned group file to be overwritten with a new CreationTime. Now, errors other than ErrorPartitionedGroupInfoNotFound are logged and abort creation, leaving the existing file untouched until the next compaction cycle retries.
Evidence“The fix captures the error and, if it is not `ErrorPartitionedGroupInfoNotFound`, logs it and returns — aborting creation so the group will be retried in the next compaction cycle.” cortexproject/cortex/pull/7766 ↗ Show release-note lines
* [BUGFIX] Compactor: Properly handle error from ReadPartitionedGroupInfo in UpdatePartitionedGroupInfo. #7766
github.com/cortexproject/cortex/releases/tag/v1.22.0Regex tenant federation startup discovery fixed
Affectssetups using regex tenant federation
Queries arriving before the first ticker tick were matched against an empty user list, causing incorrect tenant resolution. Startup now discovers users before serving queries; if initial discovery fails, the service fails to start instead of serving against an empty list.
Evidence“The service must fail to start rather than serving queries against an empty user list.” cortexproject/cortex/pull/7811 ↗ Show release-note lines
* [BUGFIX] Tenant Federation: Fix regex tenant federation resolving to an empty user list right after startup. #7811
github.com/cortexproject/cortex/releases/tag/v1.22.0Querier metadata streaming options removed
Affectsquerier configurations using -querier.ingester-metadata-streaming, ingester_metadata_streaming, or ingester_streaming
Metadata APIs now always use streaming RPCs; previously, streaming could be configured with an option that defaulted to true. Passing the removed flag stops Cortex at startup.
Evidence“Remove the deprecated `-querier.ingester-metadata-streaming` flag and its `ingester_metadata_streaming` YAML field (deprecated in 1.18.0, default `true`). Streaming RPCs are now always used for the metadata APIs. Also removes the dead hidden `ingester_streaming` YAML field left over from `-querier.ingester-streaming`.” cortexproject/cortex/releases/tag/v1.22.0 ↗ Show release-note lines
- **Removed flags and stricter config checks**: Cortex removes the deprecated `-ruler.evaluation-delay-duration`, `-querier.ingester-metadata-streaming`, and `-<prefix>.fifocache.size` flags, and eight flags that already had no effect, such as `-querier.iterators`. Passing a removed flag stops Cortex at startup, and so does a leftover `ruler_evaluation_delay_duration` in a runtime config. `query_ingesters_within` must now be less than `-blocks-storage.tsdb.close-idle-tsdb-timeout`, and a config that sets them equal stops Cortex at startup. Read the `[CHANGE]` entries below before you upgrade.
github.com/cortexproject/cortex/releases/tag/v1.22.0Cortex removes eight deprecated no-op CLI flags
AffectsCortex command lines containing any of -querier.ingester-streaming, -querier.iterators, -querier.batch-iterators, -querier.query-store-for-labels-enabled, -querier.max-outstanding-requests-per-tenant, -query-scheduler.max-outstanding-requests-per-tenant, -blocks-storage.tsdb.wal-compression-enabled, or -ingester.max-series-per-query
Action requiredRemoval of these flags from command lines before upgrading
These flags had no effect for at least two minor releases. Passing any of them now stops Cortex at startup.
Evidence“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.” cortexproject/cortex/releases/tag/v1.22.0 ↗ Show release-note lines
- **Removed flags and stricter config checks**: Cortex removes the deprecated `-ruler.evaluation-delay-duration`, `-querier.ingester-metadata-streaming`, and `-<prefix>.fifocache.size` flags, and eight flags that already had no effect, such as `-querier.iterators`. Passing a removed flag stops Cortex at startup, and so does a leftover `ruler_evaluation_delay_duration` in a runtime config. `query_ingesters_within` must now be less than `-blocks-storage.tsdb.close-idle-tsdb-timeout`, and a config that sets them equal stops Cortex at startup. Read the `[CHANGE]` entries below before you upgrade.
github.com/cortexproject/cortex/releases/tag/v1.22.0Query-ingester timeout must be below the idle-TSDB timeout
AffectsQuerier and runtime configurations with positive query_ingesters_within values at or above close_idle_tsdb_timeout, including per-tenant overrides
Action requiredclose_idle_tsdb_timeout above the largest query_ingesters_within value, or set to 0 to disable closing idle TSDBs
Earlier releases allowed and documented equal values. Now equal values make Cortex exit at startup; an offending tenant override makes runtime config fail to load, and failed reloads retain the last good overrides and set cortex_runtime_config_last_reload_successful to 0.
Evidence“The check also runs on every per-tenant override in the runtime config (on the `all`, `distributor`, `querier` and `ruler` targets), so a single tenant override that sets `query_ingesters_within` at or above `close_idle_tsdb_timeout` makes the whole runtime config fail to load” cortexproject/cortex/releases/tag/v1.22.0 ↗ Show release-note lines
- **Removed flags and stricter config checks**: Cortex removes the deprecated `-ruler.evaluation-delay-duration`, `-querier.ingester-metadata-streaming`, and `-<prefix>.fifocache.size` flags, and eight flags that already had no effect, such as `-querier.iterators`. Passing a removed flag stops Cortex at startup, and so does a leftover `ruler_evaluation_delay_duration` in a runtime config. `query_ingesters_within` must now be less than `-blocks-storage.tsdb.close-idle-tsdb-timeout`, and a config that sets them equal stops Cortex at startup. Read the `[CHANGE]` entries below before you upgrade.
github.com/cortexproject/cortex/releases/tag/v1.22.0Query time-range settings moved to per-tenant limits
Affectssetups configuring query_ingesters_within, query_store_after, or shuffle_sharding_ingesters_lookback_period in querier settings, flags, or tenant limits
Removed inv1.24.0
Previously, these settings were in the querier block and used -querier.* flags. The old field and flag names still work but log a warning and increment deprecated_flags_inuse_total; durations use model.Duration with a 1 ms minimum unit.
Evidence“The settings move from the `querier` block to `limits`, and their flags from `-querier.*` to `-limits.*`. The old YAML fields and flags still work, but are deprecated and will be removed in v1.24.0: using them logs a warning and increments `deprecated_flags_inuse_total`.” cortexproject/cortex/releases/tag/v1.22.0 ↗ Show release-note lines
- **Per-tenant query time ranges and HA failover timeout**: `query_ingesters_within`, `query_store_after`, and `shuffle_sharding_ingesters_lookback_period` move from the `querier` block to `limits`, and `-distributor.ha-tracker.failover-timeout` becomes a per-tenant limit. The 1.21 names keep working until v1.24.0 and log a warning.
github.com/cortexproject/cortex/releases/tag/v1.22.0Cortex removes deprecated no-op command-line flags
Affectsdeployments whose command lines still pass any of the eight listed flags
Action requiredRemove the listed deprecated flags from command lines before upgrading.
These flags already had no effect, but passing any of them now causes startup to fail.
Show release-note lines
* [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`)
github.com/cortexproject/cortex/releases/tag/v1.22.0Query time-range settings move to per-tenant limits
AffectsQuerier configurations using query_ingesters_within, query_store_after, or shuffle_sharding_ingesters_lookback_period
Action requiredOld and new names must not have different values in the same YAML file or on the same command line.
Removed inv1.24.0
The old querier YAML fields and -querier.* flags still work, but emit a deprecation warning and increment deprecated_flags_inuse_total; command-line flags take precedence over YAML. Durations below 1ms are unsupported.
Show release-note lines
* [CHANGE] Querier: Make query time range configurations per-tenant: `query_ingesters_within`, `query_store_after`, and `shuffle_sharding_ingesters_lookback_period`. Uses `model.Duration` instead of `time.Duration` to support serialization but has minimum unit of 1ms (nanoseconds/microseconds not supported). The settings move from the `querier` block to `limits`, and their flags from `-querier.*` to `-limits.*`. The old YAML fields and flags still work, but are deprecated and will be removed in v1.24.0: using them logs a warning and increments `deprecated_flags_inuse_total`. As before, a flag on the command line wins over the YAML file, whether it uses the old or the new name. Setting the old and the new name to different values in the same place, both in the YAML file or both on the command line, fails at startup. #7160 #7323 #7919
github.com/cortexproject/cortex/releases/tag/v1.22.0Cortex query and TSDB timeout validation tightened
Affectsconfigurations where positive query_ingesters_within is not less than close_idle_tsdb_timeout, or tenant overrides that violate these or the query-range constraints
Action requiredSet close_idle_tsdb_timeout above the largest query_ingesters_within in the config and runtime overrides, or set it to 0 to disable closing idle TSDBs.
Previously, equal positive timeout values were accepted, and the query-range checks were not applied to tenant overrides. Now, equal values make startup fail; invalid tenant overrides can also fail startup or runtime-config reloads, leaving the last good overrides in place and setting cortex_runtime_config_last_reload_successful to 0.
Show release-note lines
* [CHANGE] Querier: `query_ingesters_within` must now be strictly less than `-blocks-storage.tsdb.close-idle-tsdb-timeout` when both are positive. Earlier releases did not check this, and documented the two being equal as valid, so a config that sets them equal now makes Cortex **exit at startup** with `invalid query routing config: tenant default: query_ingesters_within (6h50m0s) must be less than close_idle_tsdb_timeout (6h50m0s)`. The check also runs on every per-tenant override in the runtime config (on the `all`, `distributor`, `querier` and `ruler` targets), so a single tenant override that sets `query_ingesters_within` at or above `close_idle_tsdb_timeout` makes the whole runtime config fail to load: Cortex exits at startup, and on an already-running process every reload fails, pinning the last good overrides and dropping `cortex_runtime_config_last_reload_successful` to 0. Before upgrading, raise `close_idle_tsdb_timeout` above the largest `query_ingesters_within` in your config and runtime overrides, or set it to 0 to disable closing idle TSDBs. The existing checks that `query_store_after` is less than `query_ingesters_within`, and that `shuffle_sharding_ingesters_lookback_period` is at least `query_store_after`, now also apply to per-tenant overrides. #7323
github.com/cortexproject/cortex/releases/tag/v1.22.0Alertmanager startup migration for legacy local state files removed
AffectsAlertmanager deployments upgrading from before 1.9.0 with a persisted local state directory
Previously, startup moved legacy local state files into per-tenant directories. The migration must now run in an intermediate release before upgrading directly to this release.
Show release-note lines
* [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
github.com/cortexproject/cortex/releases/tag/v1.22.0Silence creation now requires createdBy
AffectsClients that create silences through the HTTP API
Alertmanager's Swagger-generated API models now split Silence into separate types.
Evidence“- `createdBy` field is now required when creating a silence via the HTTP API” cortexproject/cortex/pull/7462 ↗ Show release-note lines
* [ENHANCEMENT] Upgrade prometheus alertmanager version to v0.32.1. #7462
github.com/cortexproject/cortex/releases/tag/v1.22.0RPM and deb package install paths corrected
AffectsRPM or deb installations using the package-provided systemd unit
Previously, the binary was installed at /usr/local/bin/cortex and the unit at /etc/systemd/system/cortex.service. The binary now installs at /usr/bin/cortex; the unit installs at /usr/lib/systemd/system for RPM packages and /lib/systemd/system for deb packages, and executes /usr/bin/cortex.
Show release-note lines
* [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/system` for RPM, `/lib/systemd/system` for deb), and mark the sysconfig/default env file as a config file so it is not overwritten on upgrade. #7445
github.com/cortexproject/cortex/releases/tag/v1.22.0Multitenant Alertmanager blocks tenant creation during shutdown
AffectsMultitenant Alertmanager fallback tenant creation
When a fallback request races with shutdown—including on the sharded gRPC HandleRequest path or after passing the service-state check just before shutdown—it could create an Alertmanager after existing instances were stopped, leak goroutines, and return HTTP 200. Now the request receives HTTP 503 instead of creating a new instance.
Evidence“The shutdown-vs-lazy-create hole is independent: `stopping()` stops only the alertmanagers present in the map when it runs, and `serveRequest` can be reached without `ServeHTTP`'s service-state check (the gRPC `HandleRequest` path when sharding is enabled) or after passing that check just before the state transition. A request losing that race would upload a config, register a new Alertmanager **after** shutdown stopped the others, return 200 from a shutting-down process, and leak the new instance's goroutines.” cortexproject/cortex/pull/7618 ↗ Show release-note lines
* [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
github.com/cortexproject/cortex/releases/tag/v1.22.0Per-tenant Alertmanager validation rejects global mattermost_webhook_url_file
Affectsper-tenant Alertmanager configs with a global mattermost_webhook_url_file setting
Previously, configs without a Mattermost receiver were accepted even though the setting was never read; configs with a Mattermost receiver were already rejected.
Evidence“Not exploitable today. When a mattermost receiver is present, upstream copies the global value into the receiver's `WebhookURLFile` during unmarshal, which runs before validation, so the per-receiver check already rejected it. With no mattermost receiver the value was accepted but never read.” cortexproject/cortex/pull/7768 ↗ Show release-note lines
* [BUGFIX] Alertmanager: Reject the global `mattermost_webhook_url_file` setting in per-tenant configs, consistent with every other global `*_file` setting. #7768
github.com/cortexproject/cortex/releases/tag/v1.22.0