Buying CI minutes for any namespace should never unassociate the paid tier subscription

Problem

When a group is subscribed to a paid tier (Bronze, Silver, Gold) on GitLab.com and has more billable users in the group on GitLab.com than is purchased in the subscription, when the user purchases additional CI minutes the following undesired behavior occurs -

  1. A new subscription is created for the CI minutes instead of the minutes being associated with the existing paid subscription.
  2. The group association to the previously purchase subscription (Bronze, Silver, Gold) is removed and the subscription is orphaned.

Steps to recreate

  1. Create a group in GitLab.com
  2. Purchase a subscription for any paid tier on GitLab.com for any number of users
  3. Add more billable users to the GitLab.com group than the number of users allotted in the subscription
  4. Purchase Additional CI minutes by:
    1. Navigate to group's Settings>Usage Quotas
    2. Select Buy additional minutes
    3. Follow the purchase process to buy any amount of additional minutes
  5. BUG1: A new subscription is created for the CI minutes instead of the minutes being associated with the existing paid subscription
  6. BUG2: The group association to the previously purchase subscription (Bronze, Silver, Gold) is removed and the subscription is orphaned.

Proposal

During the purchase of additional CI minutes (Step 4.3 above) in a use case like this, provide the user notice that the group's number of billable users exceeds its purchased user amount and provide option to pay for those users along with the additional CI minutes.

Example Screenshots

billing_page

Customers_portal

Current "workaround"

  1. Ask user if we can charge the card on their behalf for the additional users.
  2. Change the namespace to "free" in Gitlab.com admin
  3. Try associating the namespace with the subscription in the customers portal
  4. If the system is charging for all users and not crediting for the previously paid users, create an SE issue to see if there is a conflict causing this
  5. If the system correctly applies the credit, complete the purchase

@lyle investigating console workaround

For more: discussion on slack (internal)

Summary of Support Tickets Affected by Issue

  1. https://gitlab.zendesk.com/agent/tickets/131493
  2. https://gitlab.zendesk.com/agent/tickets/132182
  3. https://gitlab.zendesk.com/agent/tickets/132597
  4. https://gitlab.zendesk.com/agent/tickets/132437 (GL.com shows bronze, but subscription not showing group, now that it's orphaned gets 404 when trying to purchase minutes for group)
  5. https://gitlab.zendesk.com/agent/tickets/132240
  6. https://gitlab.zendesk.com/agent/tickets/132819
  7. #672 (closed)
  8. https://gitlab.zendesk.com/agent/tickets/132947
  9. https://gitlab.zendesk.com/agent/tickets/133110
  10. https://gitlab.zendesk.com/agent/tickets/133357
  11. https://gitlab.zendesk.com/agent/tickets/133546
  12. https://gitlab.zendesk.com/agent/tickets/133573
  13. https://gitlab.zendesk.com/agent/tickets/136205
  14. https://gitlab.zendesk.com/agent/tickets/137840
  15. https://gitlab.zendesk.com/agent/tickets/137791
  16. https://gitlab.zendesk.com/agent/tickets/138649
  17. https://gitlab.zendesk.com/agent/tickets/138827
  18. https://gitlab.zendesk.com/agent/tickets/138976
  19. https://gitlab.zendesk.com/agent/tickets/138730
  20. https://gitlab.zendesk.com/agent/tickets/139225
  21. https://gitlab.zendesk.com/agent/tickets/138707
  22. https://gitlab.zendesk.com/agent/tickets/141672
  23. https://gitlab.zendesk.com/agent/tickets/141926
Edited by Gayle Doud