-
Notifications
You must be signed in to change notification settings - Fork 81
AAP-53278 General API optimizations for RBAC #837
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
Open
AlanCoding
wants to merge
10
commits into
ansible:devel
Choose a base branch
from
AlanCoding:omptimizations
base: devel
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+764
−55
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
In terms of the code coverage, that's low because of added test_app to create demo data. I don't want this counted in code coverage, at all. |
8 tasks
7b56ea5 to
9d6746a
Compare
9d6746a to
19dbde1
Compare
|
DVCS PR Check Results: PR appears valid (JIRA key(s) found) |
|
rebeccahhh
approved these changes
Oct 23, 2025
kdelee
approved these changes
Oct 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Description
This does general, obligatory, optimizations of API endpoints that were recently added.
The largest code change is because using
LARGE=truewith the bootstrap script wasn't creating all the RBAC objects, additional logic to do so was added. This did help to test cases of >25 Role definitions, role-user-assignments, and role-team-assignments.This work is basically never-ending, so any stopping point is arbitrary. However, the new
/service-index/views greatly benefit from this.The found solution often repeated for
resource__content_typealso suggests that the resource summary_fields entry is generally not well-optimized, because it's unlikely someone would have continued that to include__content_type.Type of Change
Note
Improves RBAC and service-index performance via queryset prefetching, permission caching, and ansible_id annotations; refactors serializers for ansible_id handling; and expands LARGE demo data with roles/assignments plus comprehensive tests.
created_by,content_typeinEntryReadOnlyViewSet.RoleMetadataView; prefetchresourceonRoleDefinitionqueryset; prefetchteam__resourceanduser__resourcein assignment viewsets._object_ansible_id_annotationviaSubqueryonResource; prefetch__resource__content_typefor users/teams.content_type_idforresource_typeaccessors.ObjectIDAnsibleIDFieldwithObjectAnsibleIdFieldsupporting annotation-based reads and ansible_id→object_id conversion; simplifyto_representationand update validation to accept eitherobject_idorobject_ansible_id.roledefinitionrecords withDABPermissions; assign >25 permissions to users/teams; fix team-to-org linkage; addDEMO_DATA_COUNTS['roledefinition'].created_by_ansible_idnull handling.summary_fieldsacross models.Written by Cursor Bugbot for commit 19dbde1. This will update automatically on new commits. Configure here.