Skip to content

Remove the deprecated -ruler.evaluation-delay-duration limit - #7792

Open
CharlieTLe wants to merge 3 commits into
cortexproject:masterfrom
CharlieTLe:release-1.22-pr-d3-remove-ruler-evaluation-delay
Open

Remove the deprecated -ruler.evaluation-delay-duration limit#7792
CharlieTLe wants to merge 3 commits into
cortexproject:masterfrom
CharlieTLe:release-1.22-pr-d3-remove-ruler-evaluation-delay

Conversation

@CharlieTLe

Copy link
Copy Markdown
Member

Groundwork for v1.22.0. Refs #5922.

Important

Stacked on #7790 and #7791. Please merge those first; this branch contains their
commits, so the diff here shows all three until they land. Review the third commit only.

Deprecated in 1.18.0, and its own help text has said since then that it would be
removed in v1.19.0 — three minors overdue:

"Deprecated(use ruler.query-offset instead) and will be removed in v1.19.0: ..."

-ruler.query-offset / ruler_query_offset replaces it, and Overrides.RulerQueryOffset()
no longer has to take the higher of the two values — it returns RulerQueryOffset directly.

Kept as its own PR because it has the widest blast radius of the three removals.

⚠️ Upgrade note for operators

ruler_evaluation_delay_duration is a per-tenant limit, so it can appear in the runtime
config as well as on the command line. pkg/cortex/runtime_config.go decodes the runtime
config with SetStrict(true), so a leftover override there does not crash the process.
Instead it makes every runtime config reload fail, which:

  • pins the last known-good overrides in place, and
  • drops cortex_runtime_config_last_reload_successful to 0.

That is considerably easier to miss than a crash. Before upgrading:

grep -r ruler_evaluation_delay_duration <your runtime config>

The release notes should call this out prominently.

Integration tests

Five tests in integration/ruler_test.go set -ruler.evaluation-delay-duration: "0" to
disable the delay. The ruler query offset already defaults to 0, so dropping the flag
preserves their intent.

Verification

go build ./..., go vet (including the integration build tags), make doc (generated
config reference and JSON schema regenerated), and ./pkg/util/validation/... ./pkg/ruler/... ./pkg/cortex/... all green.

@dosubot dosubot Bot added component/rules Bits & bobs todo with rules and alerts: the ruler, config service etc. type/breaking type/chore Something that needs to be done; not a bug or a feature labels Aug 20, 2026
All eight have been past the two-minor deprecation window in v1-guarantees.md for at
least three minors, and every one is flag-only with no YAML config option and no effect
on behaviour, so removing them cannot change how a running cluster behaves. The only
impact is that a command line still passing one now fails at startup.

Split out from the deprecation removals that do touch YAML config or behaviour, so an
objection to those does not hold these up.

docs/blocks-storage/migrate-from-chunks-to-blocks.md stops telling readers to set
-querier.ingester-streaming. That guide still references other flags removed years ago
(-querier.second-store-engine, -querier.use-second-store-before-time); worth a separate
look at whether it should stay at all.

Signed-off-by: Charlie Le <charlie_le@apple.com>
…reaming settings

Unlike the flag-only removals, both of these have a YAML config option and one of them
changes behaviour, so they are split out here.

-<prefix>.fifocache.size was deprecated in 1.1.0, five years and twenty-one minors ago.
A cache configured only through it now starts with no capacity, because NewFifoCache no
longer copies it into MaxSizeItems.

-querier.ingester-metadata-streaming defaulted to true and its help text has promised
since 1.18.0 that the feature would be always on. The querier now always uses the
streaming metadata RPCs, so the non-streaming branches in distributor_queryable.go and
the three non-streaming methods on the local Distributor interface are gone. The tests
that parameterised over streaming on/off collapse accordingly.

Also removes the hidden ingester_streaming YAML field, which had no reader at all - it
was left behind when -querier.ingester-streaming was deprecated in 1.17.0. Because Cortex
decodes config with UnmarshalStrict, that field was still silently accepted until now.

Generated config docs and the JSON schema are regenerated.

Signed-off-by: Charlie Le <charlie_le@apple.com>
Deprecated in 1.18.0, and its own help text has said since then that it would be removed
in v1.19.0 - three minors overdue. -ruler.query-offset replaces it, and RulerQueryOffset
no longer has to take the higher of the two values.

Kept as its own change because it has the widest blast radius of the deprecation
removals: ruler_evaluation_delay_duration is a per-tenant limit, so it can appear in the
runtime config as well as on the command line. Strict decoding means a leftover override
there fails every reload rather than failing startup, which pins the last good overrides
and only shows up as cortex_runtime_config_last_reload_successful going to 0.

The integration tests set the flag to 0 to disable the delay; the ruler query offset
already defaults to 0, so dropping the flag preserves their intent.

Signed-off-by: Charlie Le <charlie_le@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/rules Bits & bobs todo with rules and alerts: the ruler, config service etc. size/XL type/breaking type/chore Something that needs to be done; not a bug or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant