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

Fix child routes not inheriting time interval configuration #3538

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

benridley
Copy link
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
Copy link
Member

juliusv commented Oct 14, 2023

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
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.

@costela
Copy link

costela commented Sep 16, 2024

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

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.

mute_time_intervals should be inherited to sub routes
3 participants