Maximum Users should always reflect current counts
Overview
Maximum Users currently represents the highest count of users on the instance during the life of the license. This is used to indicate the highest watermark of seats used on the instance.
However, Maximum Users only updates on an cronjob that runs every 24h. If an admin adds and subtracts many users, it's not clear whether this had an impact on the high watermark until the cronjob runs overnight.
Proposal
As articulated in https://gitlab.com/gitlab-org/gitlab-ee/issues/7052#note_117044318, let's make sure we are giving instance admins up-to-date info.
- We should track two values:
- Historical maximum users, which updates on the current 24 hour cronjob.
- Current maximum users, which includes the current day.
- Maximum Users should always display the Current Maximum Users, so we are always showing the most current info.
- If Current > Historical and > Seats In License, present text under Maximum Users that the instance is currently N seats over the previous maximum user count and the user may be responsible for a true-up charge if not resolved when the cronjob runs.
This way, we're showing up-to-date user counts the instance admin can use to manage their license count - and giving them a grace period to make corrections before the changes "lock in" when the cronjob runs.