Find the max limit for users count on free user cap
What does this MR do and why?
- finds the max limit to be used by the limit for the database queries.
- We need to use this since we want to only run the full_users_count once per request, which we do. So we need to find the max limit setting from all of our possible
dashboard_*limit
settings so that our comparisons for notification and enforcement will always work as we expect.- before this change we'd only get back a max possible
users_count
that matched the firstusers_count
query that was performed. That limit used in the firstusers_count
could be Enforcement or Notification depending on feature flags or placement in the stack. This could cause scenarios where our comparison withusers_count
would yield false positives/negatives due to their individual definition oflimit
when comparing tousers_count
. - after this change we'll get back the max of those entries so that we'll always have true comparison results.
- before this change we'd only get back a max possible
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #383264
Edited by Doug Stull