Skip to content

Create gitlab-experiment for combined menu [CI SKIP]

Chad Woolley requested to merge 321904-menu-gitlab-experiment-scaffold into master

What does this MR do?

Introduces the usage of gitlab-experiment to support multi-variant experiments for #301143 (closed) and other future Category:Navigation & Settings work.

Tasks

  • Introduce minimal usage of gitlab-experiment and associated :combined_menu feature flag.
  • Add user-based example to prove we can meet goal in issue #321904 (closed) to "Aim for the FF to be enabled only on a per-user basis till we have everything in that's needed"
  • We can move the params-based override to a module or common place if we still need this behavior going forward after we are more comfortable with the experiment framework. Need to discuss with Product/Design what features they want.
  • Document how to turn this on with this variant opt-in approach, by making sure the feature flag is in the :conditional status by running the chatops command to enable the flag for any user (yourself is fine):
    • /chatops run feature set --user=my-gitlab-username some_feature true.
    • Or, in dev, just Feature.enable(:some_feature)
    • See ApplicationExperiment#enabled? for more context.

NOTES:

  • Experiment superclass #publish method shouldn't use gon.global, this will be fixed in an MR: !55421 (merged)
    • If we don't see window.gon.experiment defined on the client, it may be because Gon::Base.render_data(nonce: content_security_policy_nonce) is in the wrong order in app/views/layouts/_head.html.haml

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related Issues and MRs

Related to #321904 (closed)

Edited by Chad Woolley

Merge request reports

Loading