Skip to content

Add submit license usage data banner

Corinna Gogolok requested to merge 353804_submit_license_usage_data_banner into master

What does this MR do and why?

Part of https://gitlab.com/gitlab-org/gitlab/-/issues/353804+

Depends on !89142 (merged) to be merged first.

Add a banner to remind instance admins of submitting the license usage data to the renewals service. The banner is only shown on the Admin dashboard and on the subscription page.

The banner will start showing up one month after the license's start date. It is non-dismissable until the license usage data/seat utilization data was exported by any admin. When dismissed, it will show up in the next month again.

Screenshots or screen recordings

Page Screenshot
Admin page (non-dismissable) dashboard_not_dismissable
Admin page (dismissable) dashboard_dismissable
Subscription page (non-dismissable) subscription_not_dismissable
Subscription page (dismissable) subscription_dismissable

How to set up and validate locally

You need to start a rails console to check some things:

  1. Make sure Gitlab::CurrentSettings.should_check_namespace_plan? returns false.
  2. Make sure Feature.enabled?(:automated_email_provision) returns true.
  3. This assumes you haven't interacted with anything regarding this banner before (e.g. not testing !89142 (merged) before).
  4. Upload a license into your GitLab instance that fulfills the following conditions:
    1. It's an Offline Cloud License.
    2. It's not for a trial.
    3. It started today
  5. Visit the Admin area's Dashboard page (/admin) and the Subscription page (/admin/subscription) and verify the banner is not shown.
  6. Upload a similar license as above but make sure it started more than a month ago.
  7. Visit the Admin area's Dashboard page (/admin) and the Subscription page (/admin/subscription) to see the banner.
  8. Verify the banner is not dismissble.
  9. Download the license usage data on the Subscription page (/admin/subscription) with another admin user.
  10. With the first admin, visit the Dashboard page (/admin) or the Subscription page (/admin/subscription) again and verify the banner is now dismissable.
  11. Dismiss the banner and reload the page to verify the banner does not show up anymore.

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