Skip to content

Fix child routes not inheriting time interval configuration - #3538

Closed
benridley wants to merge 2 commits into
prometheus:mainfrom
benridley:bugfix_time_interval_inheritance
Closed

benridley wants to merge 2 commits into
prometheus:mainfrom
benridley:bugfix_time_interval_inheritance

Conversation

@benridley

Copy link
Copy Markdown
Contributor

Fixes #2833.

Fixes a bug in the creation of routes which would mistakenly override parent route config with empty time interval configuration if none were specified on the child.

Fixes a bug in the creation of routes which would mistakenly override parent route config with empty time interval configuration if none were specified on the child.

Signed-off-by: Ben Ridley <[email protected]>
@benridley
benridley force-pushed the bugfix_time_interval_inheritance branch from 5f93ef6 to 148f4a8 Compare September 29, 2023 00:26
@juliusv

juliusv commented Oct 14, 2023

Copy link
Copy Markdown
Member

Thanks! I haven't checked in detail, but @simonpasquier mentioned in #2833 (comment) that overriding time intervals in children could lead to issues because empty time intervals are also valid. Would setting an explicit empty list of intervals (vs. omitting the field entirely) in a child allow overriding the time intervals of a parent with this PR?

@benridley

Copy link
Copy Markdown
Contributor Author

Thanks! I haven't checked in detail, but @simonpasquier mentioned in #2833 (comment) that overriding time intervals in children could lead to issues because empty time intervals are also valid. Would setting an explicit empty list of intervals (vs. omitting the field entirely) in a child allow overriding the time intervals of a parent with this PR?

Maybe I'm misunderstanding the implications of this, but I think this shouldn't have any impact. Previously, every new route would receive an explicit empty list of intervals (through the DefaultRouteOpts struct) regardless of whether the parent had a set of time intervals or not. Now, child route will receive an empty list, or the parent's list if its not empty.

So empty time intervals on the parent will result in the same behaviour before this change. The change will be if the parent has defined intervals which will now be inherited.

@juliusv
juliusv requested a review from simonpasquier October 23, 2023 12:57
@costela

costela commented Sep 16, 2024

Copy link
Copy Markdown

Friendly ping: the review seems to have fallen through the cracks? 😇

aither64 added a commit to vpsfreecz/vpsfree-cz-configuration that referenced this pull request Dec 15, 2025
Apparently, active_time_intervals setting is not inherited by child
routes, see:

  prometheus/alertmanager#2833
  prometheus/alertmanager#3538
@SoloJacobs

Copy link
Copy Markdown
Contributor

Julius is correct there: Empty list [] is indeed overridden by the parent, despite the docs promising, that this mute nothing.

@SoloJacobs

Copy link
Copy Markdown
Contributor

We talked about this at Alertmanager Bug Scrub, decided that this PR cannot be merged, but the original issue should remain open. The reason is that changing the meaning of the existing fields will silently mute a lot of alerts. Having a migration path for existing configuration is thus a prerequisite, something we will work towards in the future.

Sorry, to the users, which are still waiting for this change. It will have to wait for even longer.

Kind regards, Solomon Jacobs

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mute_time_intervals should be inherited to sub routes

5 participants