-
Notifications
You must be signed in to change notification settings - Fork 251
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
feat: add toBuilder for resource definitions #1992
feat: add toBuilder for resource definitions #1992
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.
Currently, all subclasses of ResourceDefinition
have to call initialize the base class's id
and transferprocessId
properties by invoking
.id(id)
.transferProcess(transferProcessId)
//
Maybe that could be done by the ResourceDefinition
class to avoid code duplication? Also, if the base class ever receives another property, that would have t be re-done in all the subclasses...
@paullatzelsperger good point, updated it |
Codecov ReportBase: 63.63% // Head: 63.64% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1992 +/- ##
==========================================
+ Coverage 63.63% 63.64% +0.01%
==========================================
Files 772 772
Lines 16357 16370 +13
Branches 1055 1055
==========================================
+ Hits 10408 10418 +10
- Misses 5505 5508 +3
Partials 444 444
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
1efc0d6
to
6e0202a
Compare
What this PR changes/adds
It adds a
toBuilder()
method for allResourceDefinitions
.Why it does that
During policy evaluation, functions may modify a
ResourceDefinition
. When each definition is re-created from scratch, information may get lost. Therefore, definitions should be convertable to a builder that can be easily modified.Linked Issue(s)
Closes #1717
Checklist
no-changelog
)