Skip seat usage cache for preview billable user change service
What does this MR do and why?
Fixes: customers-gitlab-com#7399 (closed)
GitlabSubscriptions::Reconciliations::CheckSeatUsageAlertsEligibilityService
is called immediately after purchasing a subscription, before the subscription has time to fully propagate to Cdot. This results in us caching a nil
value when we should not. This results in us not showing the user overage modal when adding members to a group.
This MR makes it so we skip the cache for this check so we correctly show the user overage modal.
How to set up and validate locally
Enable :overage_members_modal
FF
Before
- [Gitlab] Create a group
- [Gitlab] Purchase a subscription (Group > Settings > Billing)
- [Gitlab] In a console, notice the following returns
false
when it should not.
GitlabSubscriptions::Reconciliations::CheckSeatUsageAlertsEligibilityService.new(namespace: namespace).execute
- [Gitlab] OR, add members to the group (Group > Manage > Members > Invite Members). Notice no modal appears warning of overages.
After
- Follow steps 1 and 2 above.
- [Gitlab] In a console, notice the following returns
true
GitlabSubscriptions::Reconciliations::CheckSeatUsageAlertsEligibilityService.new(namespace: namespace, skip_cached: true).execute
- Notice adding members now results in an overage modal.
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.
Edited by Ryan Cobb