Replace namespace query with instance query to fetch purchase details
What does this MR do and why?
Replaces namespace query with instance query for addOnPurchase
to get add-on purchase details on Code Suggestions tab on Usage Quotas page.
- Injects and accepts an optional group ID property in
code_suggestions_usage.vue
to make the component generic for both SaaS and SM instances - Update response data structure to match the new query response
- Add/update corresponding tests and mock data
Changelog not required as all changes are behind a feature flag.
Screenshots or screen recordings
No visual changes are introduced in this MR. Screenshots below are making sure that the existing functionality still works.
Scenario | Screenshot |
---|---|
When add-on purchase exists | |
When no add-on purchase exists |
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
Purchase an add-on for the subscription purchased above in Group setup
step by following the instructions here (under Add Code Suggestions Add-On to a subscription
section).
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.
Related to #432433
Edited by Vamsi Vempati