Skip to content

Use new Reconciliation endpoint for overages

What does this MR do and why?

What?

Use Reconciliation endpoint of CustomersDot to provide information about subscription eligibility. This endpoint is used to define if we should show information about subscription overage for the group.

Why?

Currently we only show overage to users who purchased the subscription. Reconciliation allows all users to get information about subscription reconciliation eligibility => all users who are able to add users/groups to a group will see the overage warning.

Important

Don't merge before https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/6260 is deployed to production

Related to #386281 (closed)

Screenshots or screen recordings

Before: no overage modal is shown for users that didn't purchase the subscription

After: show overage modal for users that didn't purchase the subscription

Step Screenshot
User #1 creates a subscription for 1 person Screenshot_2023-01-11_at_11.57.15
User #1 adds a new user as Owner Screenshot_2023-01-11_at_12.04.35
User #1 sees an overage modal Screenshot_2023-01-11_at_11.57.49
Now there are two users in a group Screenshot_2023-01-11_at_11.58.26
Impersonate User #2 and get to the member list of the same group Screenshot_2023-01-11_at_12.00.47
User #2 adds a User #3 to a group Screenshot_2023-01-11_at_12.04.35
User #2 sees an overage modal (THAT IS THE CHANGE! Before we would only show it to a User #1 because they purchased the subscription). Screenshot_2023-01-11_at_12.06.58
Screenshot_2023-01-11_at_12.07.07

How to set up and validate locally

  1. Check out https://gitlab.com/gitlab-org/customers-gitlab-com/-/tree/dz/386281-add-seats-reconciliation-endpoint branch and run CustomerDot locally.

  2. Make sure that you are running GitLab as SaaS and have check_namespace_plan setting enabled

::Gitlab::CurrentSettings.update(check_namespace_plan: true)

To test members invite:

  1. Create a group, add a premium subscription for one seat
  2. Visit this group page, then Group Information -> Members http://localhost:3000/groups/<your-group>/-/group_members.
  3. Click the Invite members button.
  4. Add a member in a dropdown and click Invite.
  5. Check the modal.

To test groups invite:

  1. Create a group, add a premium subscription for one seat
  2. Visit this group page, then Group Information -> Members http://localhost:3000/groups/<your-group>/-/group_members.
  3. Click the Invite group button.
  4. Add a group in a dropdown and click Invite.
  5. Check the 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.

Edited by Diana Zubova

Merge request reports