Improve list role assignments filtering performance
When listing role assignments, we have the option to filter them by actor, target and role.
As Henry Nash pointed out at [1] , the current implementation uses the standard filtering the V3.wrap_collection.
Given the large number of individual assignments, this is pretty inefficient.
The controller should pass the filters into the driver call, so that the list size is kept a minimum.
For example, if the user wants to filter role assignments by project X, the driver would query the DB only selecting the role assignments where target_id = X.id, instead of querying everything and returning the result to be filtered by the controller.
In addition, expansion logic should be placed at Manager level, while Controller is charged of validating the provided filter combinations.
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- High
- Drafter:
- Samuel de Medeiros Queiroz
- Direction:
- Approved
- Assignee:
- Samuel de Medeiros Queiroz
- Definition:
- Approved
- Series goal:
- Accepted for liberty
- Implementation:
- Implemented
- Milestone target:
- 8.0.0
- Started by
- Morgan Fainberg
- Completed by
- Morgan Fainberg
Related branches
Related bugs
Sprints
Whiteboard
Decided at the Midcycle that this is Complex enough that it requires a spec.
Gerrit topic: https:/
Addressed by: https:/
Improve list role assignments filters performance
Gerrit topic: https:/
Addressed by: https:/
Improve List Role Assignments Filters Performance
Addressed by: https:/
Improve creation of expected assignments in tests
Addressed by: https:/
Improve List Role Assignment Tests
Addressed by: https:/
Refactor check of targets and actors on RoleV3
Addressed by: https:/
Check for invalid filtering on v3/role_assignments
Gerrit topic: https:/
Gerrit topic: https:/