-
Notifications
You must be signed in to change notification settings - Fork 165
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 dispatch count for list objects #1427
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1427 +/- ##
=======================================
Coverage ? 85.81%
=======================================
Files ? 85
Lines ? 7938
Branches ? 0
=======================================
Hits ? 6811
Misses ? 793
Partials ? 334 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Will Vedder <willvedd@gmail.com>
Co-authored-by: Will Vedder <willvedd@gmail.com>
Co-authored-by: Jonathan Whitaker <jon.b.whitaker@gmail.com>
@poovamraj please add some more tests, specifically these cases: Test Case 1
This returns 2 dispatches - note that this is non-ideal and points out an inefficiency in our algorithm, because Test Case 2
This should return 2 dispatches today - note: it should only require 1 but because of the inefficiency in our algorithm today this returns 2. Test Case 3
This should return 2 dispatches today - again, it should only require 1 dispatch but it won't until we improve our algorithm a bit. |
Co-authored-by: Maria Ines Parnisari <maria.inesparnisari@okta.com>
Co-authored-by: Maria Ines Parnisari <maria.inesparnisari@okta.com>
Co-authored-by: Maria Ines Parnisari <maria.inesparnisari@okta.com>
…enfga/openfga into dispatch_count_for_list_objects
@jon-whit added the test cases except No.1 as it is already the first test case |
Co-authored-by: Jonathan Whitaker <jon.b.whitaker@gmail.com>
Co-authored-by: Jonathan Whitaker <jon.b.whitaker@gmail.com>
Co-authored-by: Jonathan Whitaker <jon.b.whitaker@gmail.com>
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.
Nice job.
Description
As a continuation of adding
DispatchCount
metrics to theCheck
endpoint, we have added it toListObjects
as well to identify the amount of reverse expands and checks that are done for each request.ListObjects works by reverse expanding from a subject to a list of objects with particular relation. There will be recursion involved in cases union and inheritance uses cases. And we run the check on each object that is retrieved if there is intersection or exclusion present so as to identify the related list of objects. We are counting these dispatches to identify the complexity of queries.
References
Continuation of Dispatch Count in Check - #1343
Review Checklist
main