Replace client resolvers with API for add-on eligible users
What does this MR do and why?
Replace client resolvers with API for add-on eligible users
- Remove sort option as it is not yet supported (decision here: https://gitlab.com/gitlab-org/gitlab/-/issues/421974#note_1578239332)
Related to #421967
Screenshots or screen recordings
Screen_Recording_2023-10-03_at_4.41.05_PM
How to set up and validate locally
Application setup
- Customers Dot needs to be setup in order to view the billing page for a group
- Start GDK in SaaS mode
GITLAB_SIMULATE_SAAS=1 gdk start
Group setup
- Create a Group
- Buy a Subscription for your group from
Settings
>Billing
Feature flag
Run the following in your rails console
Feature.enable(:hamilton_seat_management, Namespace.find(your-group-id)
Add-on purchase
Run the following in your rails console
- Find the namespace
namespace = Namespace.find(your-group-id)
- Create an Addon
add_on = GitlabSubscriptions::AddOn.find_or_create_by!(name: "code_suggestions") {|e| e.description = "Test"}
- Create an add-on purchase
GitlabSubscriptions::AddOnPurchase.create!(add_on: add_on, namespace: namespace, expires_on: 1.month.from_now, quantity: 20, purchase_xid: 'A-S0001')
Code Suggestions tab
- Visit
/groups/<your-namespace-name>/-/usage_quotas#code-suggestions-usage-tab
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 Vamsi Vempati