Skip to content

Render manual renewal banner

Corinna Gogolok requested to merge 346259_render_manual_renewal_banner into master

What does this MR do and why?

Part of https://gitlab.com/gitlab-org/gitlab/-/issues/346259

Depends on !75872 (merged) to be merged first

This change will use the logic that was introduced in !75872 (merged) to render the manual renewal banner.

The banner will only be displayed for customers with a self-managed cloud license but have restricted internet access that prevents them from renewing their license automatically and have to take manual action. This condition is still under discussion though and therefore not added yet. Since the feature is behind a feature flag, the missing condition can be added at a later time.

Furthermore, there should be no future license in the system. The current license is either expired or expiring within the next 14 days (notification window) in order to show up.

To see the banner, the customer has to be logged in as an admin and can see the banner on the admin dashboard (/admin) and the subscription page (/admin/subscription).

Please see the issue for more information.

Screenshots or screen recordings

scenario screenshot
expired on admin dashboard (/admin) dash_expired
expiring within notification period on admin dashboard (/admin) dash_expiring
expiring outside of notification period on admin dashboard (/admin) dash_expiring_outside
expired but with future dated on admin dashboard (/admin) dash_future_dated
expired on subscription page (/admin/subscription) sub_expiring
expiring within notification period on subscription page (/admin/subscription) sub_expired
expiring outside of notification period on subscription page (/admin/subscription) sub_expiring_outside
expired but with future dated on subscription page (/admin/subscription) sub_future_dated

How to set up and validate locally

In your CustomersDot instance:

  1. Log into the admin area.
  2. Go to /admin/license/new.
  3. Create a license that has expired a few days ago and keep the license key ready.
  4. Go to /admin/license/new again.
  5. Create a license that will expire in the 14 days (within notification window) and keep the license key ready.
  6. Go to /admin/license/new again.
  7. Create a license that will expire in the 25 days (outside of notification window) and keep the license key ready.
  8. Go to /admin/license/new again.
  9. Create a license that will start in the future and keep the license key ready.

In your GitLab instance:

  1. Go into the rails console.
  2. Delete all uploaded licenses (License.destroy_all)
  3. Enable the feature flag: Feature.enable(:automated_email_provision).
  4. Visit your GitLab instance in the browser.
  5. Log into the admin area and make sure you are on /admin.
  6. Upload the previously created expired license.
  7. See the banner with the expired wording on /admin and on /admin/license.
  8. Upload the future-dated license.
  9. Do not see the banner anymore.
  10. Delete both licenses again.
  11. Upload the previously created expiring license (within notification window).
  12. See the banner with the expiring wording on /admin and on /admin/license.
  13. Upload the previously created expiring license (outside of notification window).
  14. Do not see the banner.

MR acceptance checklist

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

Edited by Corinna Gogolok

Merge request reports