Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify lack of route time interval inheritance in docs #3211

Open
gebn opened this issue Jan 10, 2023 · 2 comments
Open

Clarify lack of route time interval inheritance in docs #3211

gebn opened this issue Jan 10, 2023 · 2 comments

Comments

@gebn
Copy link

gebn commented Jan 10, 2023

The <route> docs state optional configuration parameters are inherited from its parent node if not set. active_time_intervals and mute_time_intervals are currently copied as part of RouteOps, however they are then overwritten without the nil check that guards other parameters, removing the inheritance. Is this intentional?

The effect is a parent will not implicitly mute its children, e.g. given the following, a and b will still receive every alert all the time:

...
route:
  receiver: default
  routes:
  - routes:
    - receiver: a
      continue: true
    - receiver: b
    mute_time_intervals:
    - everyday
time_intervals:
- name: everyday
  time_intervals:
  - weekdays:
    - sunday:saturday

This tripped us up, as we wanted to notify two receivers with the same mute condition, and the only way to do this is to move the mute down into each child, e.g.

route:
  receiver: default
  routes:
  - routes:
    - receiver: a
      mute_time_intervals:
      - everyday
      continue: true
    - receiver: b
      mute_time_intervals:
      - everyday

If this is intended behaviour, I think it's worth making more explicit in the docs. I'm happy to submit a PR on confirmation.

@jmaixl
Copy link

jmaixl commented Jun 15, 2023

Echoing this bug/feature request. I was just tripped up on this as well which forces me to duplicate routes in the routing tree.

@benridley
Copy link
Contributor

This is not intentional. I've opened PR #3538 to address it, thanks for opening this!

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

No branches or pull requests

4 participants