-
Notifications
You must be signed in to change notification settings - Fork 93
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
REST API: count include-all results when checking max resources limit #901
REST API: count include-all results when checking max resources limit #901
Conversation
|
||
if opts.IncludeDeleted { | ||
// if IncludeDeleted is set, need to construct a query (preserving filters) to count deleted values that would be returned from | ||
// asset, app, account_asset, account_app | ||
o.CountOnly = true | ||
countOnly = true |
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.
For the resource limit check, don't we always want this to be true?
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.
Nevermind, I forgot that in that case we are looking up the data from the account.
Codecov Report
@@ Coverage Diff @@
## feature/unlimited-assets #901 +/- ##
===========================================================
Coverage ? 59.07%
===========================================================
Files ? 42
Lines ? 5644
Branches ? 0
===========================================================
Hits ? 3334
Misses ? 1868
Partials ? 442 Continue to review full report at Codecov.
|
Summary
Handle include-all when checking max resources limit by adding option to perform count queries to buildAccountQuery rather than fetch full results. Follow-up to #872
Test Plan
Extended TestAccountMaxResultsLimit to create and destroy assets and apps, check behavior of include-all with limits.