Skip to content

Show Code Suggestions menu item for paid plans only on SM instance

What does this MR do and why?

Show Code Suggestions menu item for paid plans only on SM instance

Related to #435912

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.

Scenario Before After
Free plan

Screen Recording 2023-12-20 at 4.03.55 PM.mov

After_free.png

Paid plan (no change)

Paid plan.png Before_paid_1.png

Screenshot 2023-12-20 at 7.51.48 PM.png

After_paid_1.png

How to set up and validate locally

Application setup

  1. Customers Dot needs to be setup
  2. Start GDK in SM mode GITLAB_SIMULATE_SAAS=0 gdk start

Feature flag

Run the following in your rails console using GITLAB_SIMULATE_SAAS=0 rails c .

We don't need this feature flag for the menu item to not show up, but its to verify that the menu item doesn't show up despite the feature flag being in enabled state for SM.

Feature.enable(:self_managed_code_suggestions)

Subscription setup

  1. Make sure there is no active subscription on the instance by going to Admin area > Subscription
  2. If there is one, use Remove license to remove it

After the MR verification, if you need a license, you can follow the below steps to setup one:

  1. Buy Self-Managed Ultimate 1 Year subscription on Zuora Sandbox
  2. Copy the license key from the subscription details page on local Customers Dot instance
  3. Paste the license key on your SM instance at Admin Area > Settings > General > Add license
  4. Go to Admin area > Subscription => you should be able to see the new license

Code Suggestions menu item

  1. Log in to the SM instance as an admin, eg. root
  2. Go to the menu under Admin area
  3. Make sure the menu doesn't have an entry for Code Suggestions beneath Subscription.
Edited by Vamsi Vempati

Merge request reports

Loading