Invoke Reset Callouts worker upon member deletion
What does this MR do and why?
Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/441795. This MR resets the all seats used callout when members are removed from a group or project. This is intended to account for the following scenario:
- Assume that
seats
andseats_in_use
have the same value. The owner will see the alert - At
T
, the owner dismissed the alert - At
T1
, the value ofseats_in_use
changes - If
seats
andseats_in_use
have the same value once more, we want to show the alert
Note: the showing of the callout is behind a FF.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Clip link | Passcode: 9$yLObx%|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
In rails console enable the experiment fully
Feature.enable(:block_seat_overages)
-
Have a group w/ a subscription plan and X users
-
Make sure all seats are occupied
-
Visit any group or project member pages such as
http://127.0.0.1:3000/groups/flightjs/-/group_members
-
The banner should display
-
Close the banner
-
Remove a member from the group
-
Add enough members to match the current purchased seats
-
The banner should display again
Note that because this uses reactive caching, the banners may not load on the initial page load, and you need to make sure that your rails background jobs are working locally.