Skip to content

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 and seats_in_use have the same value. The owner will see the alert
  • At T, the owner dismissed the alert
  • At T1, the value of seats_in_use changes
  • If seats and seats_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.

  1. In rails console enable the experiment fully

    Feature.enable(:block_seat_overages)
  2. Have a group w/ a subscription plan and X users

  3. Make sure all seats are occupied

  4. Visit any group or project member pages such as http://127.0.0.1:3000/groups/flightjs/-/group_members

  5. The banner should display

  6. Close the banner

  7. Remove a member from the group

  8. Add enough members to match the current purchased seats

  9. 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.

Edited by Angelo Gulina

Merge request reports