-
Notifications
You must be signed in to change notification settings - Fork 253
Use set comparison for updating permissions, groups, actions, and object types #1456
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
Conversation
These suboptions of users, user groups, and permissions were previously compared as lists for the purposes of updates, and so would update the object whenever the order would change.
sc68cal
left a comment
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.
This looks good to me, just needs to be updated with the latest from devel
|
Working on a fix to devel that hopefully will fix the sanity failures |
|
This looks really good, I know you're still working on getting everything to pass but I think this has a lot of promise, so keep it up |
sc68cal
left a comment
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.
Looks good. Also, thank you for the well written commit messages, it answered a few questions I had in review, saving time.
Related Issue
#1455
New Behavior
user.groups,user.permissions,user_group.permissions,permission.actions, andpermission.object_typesare all serialized as lists. When compared as lists, however, any ordering changes means that theuser,user_group, orpermissionare updated unnecessarily.Contrast to Current Behavior
Convert these fields into sets prior to comparison during the update process.
Discussion: Benefits and Drawbacks
Unnecessary updates can be very costly for objects with large numbers of permissions, so avoiding that would be great.
The only drawback I can think of would be a negligible increase in compute, which is offset by fewer required network requests.
I don't think ordering of these fields is a feature so this would be backwards compatible.
Changes to the Documentation
No changes.
Proposed Release Note Entry
user.groups,user.permissions,user_group.permissions,permission.actions, andpermission.object_typesare now treated as unordered sets for update comparison purposes.Double Check
develbranch.