Skip to content

docs: clarify that time intervals are not inherited by child routes - #5551

Closed
xenon898 wants to merge 1 commit into
prometheus:mainfrom
xenon898:docs-time-interval-inheritance
Closed

xenon898 wants to merge 1 commit into
prometheus:mainfrom
xenon898:docs-time-interval-inheritance

Conversation

@xenon898

Copy link
Copy Markdown

What

The <route> docs say "optional configuration parameters are inherited from its parent node if not set", but mute_time_intervals and active_time_intervals are unconditionally set from the current route's config in newRoute — they lack the nil-check that group_by, group_wait, group_interval, and repeat_interval use, so they are never inherited.

This trips users up when they set mute_time_intervals on a parent route expecting it to mute the whole subtree (see #3211). This PR documents the actual behavior in docs/configuration.md:

  • the <route> "inherited from its parent" sentence now notes the exception
  • the mute_time_intervals field comment explains it is not inherited, and how to mute a subtree
  • the active_time_intervals field comment notes it is not inherited

Docs-only, no functional change.

Closes #3211

Follow-up to #3538 (attempted to change the behavior; closed unmerged).

🤖 Generated with Claude Code

The <route> docs state that optional configuration parameters are
inherited from the parent node if not set, but mute_time_intervals and
active_time_intervals are unconditionally set from the current route's
config in newRoute (dispatch/route.go) without the nil-check that the
other inherited options use. As a result they are never inherited, and a
parent route's time intervals do not mute or gate its subtree.

Document the actual behavior so users don't expect a parent's time
intervals to apply to child routes. Docs-only, no functional change.

Closes prometheus#3211

Signed-off-by: xenon898 <88700568+xenon898@users.noreply.github.com>
@xenon898
xenon898 requested a review from a team as a code owner September 10, 2026 11:01
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 4d889ebe-ec9a-4eea-a797-b07fd1351a23

📥 Commits

Reviewing files that changed from the base of the PR and between 5200ea3 and 15a10ac.

📒 Files selected for processing (1)
  • docs/configuration.md

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The route configuration documentation now states that mute_time_intervals and active_time_intervals are not inherited by child routes. It also explains that each descendant route with a receiver must define its own mute interval.

Changes

Route time interval documentation

Layer / File(s) Summary
Clarify route interval scope
docs/configuration.md
The <route> introduction and both parameter descriptions state that mute_time_intervals and active_time_intervals apply only to the route where they are defined. The mute interval guidance explains how to mute a route subtree.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 15a10

This change clarifies that route time intervals are not inherited by child routes. It does not alter runtime behavior and is mergeable after normal documentation checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the documentation change: time intervals are not inherited by child routes.
Description check ✅ Passed The description explains the current behavior, affected fields, documentation updates, scope, linked issue, and absence of functional changes. It does not reproduce the checklist or release-notes bloc…
Linked Issues check ✅ Passed The documentation changes satisfy issue #3211 by documenting that mute_time_intervals and active_time_intervals are not inherited and by explaining that child routes must be configured separately when…
Out of Scope Changes check ✅ Passed The changes are limited to the requested documentation clarification. No unrelated or functional changes are included.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SoloJacobs SoloJacobs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#5440 Already meantions this: Please don't close the original issue.

@xenon898 xenon898 closed this Sep 10, 2026
@xenon898

Copy link
Copy Markdown
Author

Apologies — I did not spot #5440 before opening this. It predates this PR and is more complete (it also lists which parameters are inherited), so closing in its favour. Thanks @SoloJacobs; #3211 stays open for #5440 to resolve.

@SoloJacobs

Copy link
Copy Markdown
Contributor

@xenon898 Looks like the other contributors won't cleanup there changes. Do you want to pick them up?

@xenon898

Copy link
Copy Markdown
Author

Thanks @SoloJacobs — happy to pick this up.

Before I do, want to confirm direction rather than burn a third attempt on the wrong one. Looking at newRoute (dispatch/route.go): every other route option follows the same pattern — start from the parent's resolved value, only overwrite if the child explicitly sets it (receiver, group_by, group_wait, group_interval, repeat_interval; labels additionally merges rather than replacing). mute_time_intervals/active_time_intervals are the only fields that don't follow this — they're unconditionally set from the child's own YAML, so an omitted field becomes [] instead of inheriting the parent's value.

Two ways to close this out:

  1. Docs-only: accurately document the current behavior (fixing docs: note mute/active time intervals are not inherited #5440's inaccurate "merging" framing, and dropping any Fixes/Closes trailer since the inconsistency itself remains).
  2. Behavior fix: make these two fields follow the same inherit-unless-set pattern as the others, matching @benridley's original "this is not intentional" from Fix child routes not inheriting time interval configuration #3538 — then document the corrected behavior.

Which do you want? Happy to do either.

@SoloJacobs

Copy link
Copy Markdown
Contributor

We will do a docs only change, and keep the issue open. The project is not ready for breaking changes inside the config. Another note: the new receiver labels are also not consistent with the other types of inheritance (as you pointed out). That's just something to keep in mind to not overclaim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify lack of route time interval inheritance in docs

2 participants