Skip to content

Feat(Licensing): add Offline cloud type

What does this MR do and why?

Describe in detail what your merge request does and why.

With the introduction of Zuora field: <code data-sourcepos="5:41-5:63">TurnOnCloudLicensing__c</code> = <code data-sourcepos="5:69-5:77">"Offline"</code> we are introducing a type to be displayed in the frontend, so the user can see the license types of current, past licenses, and future subscriptions.

Please see the discussion here for more information: https://gitlab.com/gitlab-org/gitlab/-/issues/349810#note_823286844.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

Before After
Screen_Shot_2022-02-16_at_18.05.28 Screen_Shot_2022-02-16_at_18.05.02

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

This was a hard situation to mimic, so going to post the whole recording of how we got it to work here: https://youtu.be/2e25kzD0wEs

  1. Visit any group or project member pages such as http://127.0.0.1:3000/admin/subscription
  2. Make sure to have CustomersDot set up with Zuora to create a back-dated legacy license that is about to expire (started a year minus a week ago) and add it. You can follow the instructions here (a bit out-dated, but still works): https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/staging/doc/resource_videos.md
  3. Do one of these two:
    1. Log into https://apisandbox.zuora.com/, find the subscription and update it to be cloud license to Yes:

      Screen_Shot_2022-02-11_at_16.59.26
    2. Log into http://localhost:5000/admin/customer, find the customer and click "Zuora Subscriptions" (the little bookmark on the right) and update all the fields to Yes:

      Screen_Shot_2022-02-11_at_16.57.22
  4. Apply this patch: fake-cloud-license-renewal-of-legacy-license.patch
  5. Find the subscription activation code in http://localhost:5000/ and activate it in your instance.
  6. You should see that the current subscription is still a License file type and that the offline cloud license subscription in the Subscription History Table shows as Offline cloud
  7. Go through the process of creating another subscription that has Cloud License Enabled set to Yes and add it to the user. This should still show as Cloud license

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #349810

Edited by Michael Lunøe

Merge request reports