-
Notifications
You must be signed in to change notification settings - Fork 6
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
Remove MergedConfig
#457
Remove MergedConfig
#457
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice. maybe an entry in the change log would be nice, even if it's not user facing.
I would argue that these externally invisible changes don't make sense to add, "refactored |
This is probably a discipline vs. common sense discussion. I can get behind both arguments, just mentioned it because it's a checkbox for the reviewer. |
Description
Fixes #456.
This is intended to solve two things:
MergedConfig
containing the union of all roles' options, making it unclear which fields available when (and the especially comical case whereresources
exists in all variants... but still has a separate accessor method for each).Instead, this PR delegates actually-common options to the new
struct CommonNodeConfig
and introduces a newenum AnyNodeConfig
which users can explicitly downcast from to access role-specific options. Common options are accessible immediately becauseAnyNodeConfig
derefs toCommonNodeConfig
.This PR replaces all uses of
&dyn MergedConfig
with&AnyNodeConfig
to minimize impact. In the future, it's intended that new code that is only relevant for a single role should use that role's config type directly.Definition of Done Checklist
Author
Reviewer
Acceptance