Skip to content

Conversation

dchiquito
Copy link
Contributor

@dchiquito dchiquito commented Aug 23, 2025

Related Issue

#1455

New Behavior

user.groups, user.permissions, user_group.permissions, permission.actions, and permission.object_types are all serialized as lists. When compared as lists, however, any ordering changes means that the user, user_group, or permission are 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, and permission.object_types are now treated as unordered sets for update comparison purposes.

Double Check

  • I have read the comments and followed the CONTRIBUTING.md.
  • I have explained my PR according to the information in the comments or in a linked issue.
  • My PR targets the devel branch.

Copy link
Contributor

@sc68cal sc68cal left a 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

@sc68cal
Copy link
Contributor

sc68cal commented Sep 9, 2025

Working on a fix to devel that hopefully will fix the sanity failures

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.

2 participants