Skip to content

Experiment to add tier badge

What does this MR do and why?

This adds an experiment to display a tier badge (currently only available to free tiers) highlight they are using the free tier of GitLab.

The badge will only show for projects that are part of a group.

Screenshots or screen recordings

image

How to set up and validate locally

  1. Open a new gdk console (gdk rails c)

  2. Inside the console:

    # Enable for everyone
    Feature.enable(:tier_badge)
    
    # Get the `experiment` method -- already available in controllers, views, and mailers.
    include Gitlab::Experiment::Dsl
    # Enable for only the first user
    Feature.enable(:tier_badge, experiment(:tier_badge, actor: User.first))

    From https://docs.gitlab.com/ee/development/experiment_guide/implementing_experiments.html#implementing-an-abn-experiment

    Note: This is cached, so if you enable/disable it in may take a bit until the state is reflected in the UI

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 #345514 (closed)

Edited by Jay Montal

Merge request reports