Experiment: Pipeline Editor Walkthrough tracking
What does this MR do and why?
This MR implement tracking for Pipeline Editor walkthrough experiment.
It updates the context of :pipeline_editor_walkthrough experiment to { namespace: @project.namespace } so we can record the namespace_id in experiments_subjects table (after calling e.record!). The namespace_id will be used to analyze the result of the experiment by looking at the number of created pipelines for the namespace (gitlab_dotcom_daily_usage_data_events table in Sisense).
It also adds sticky_to option with current_user as the value since we still want each user to always be in either the candidate or control group regardless of the project's namespace when visiting the pipeline editor page.
How to set up and validate locally
Setup
- Enable
:pipeline_editor_walkthroughexperiment feature flag inrails console:Feature.enable(:pipeline_editor_walkthrough) - Create a project with Auto DevOps disabled in the project settings CI/CD section (Auto DevOps will add pipelines to a project which we don't want)
Validate
-
Go to the Pipeline Editor page of the project you just created
-
Open Rails console and validate that the experiment subject is recorded in the database. The
namespace_idis the important bit here> r = ExperimentSubject.last => <ExperimentSubject:_ id: 2, experiment_id: 2, user_id: nil, project_id: nil, variant: "experimental", created_at: Mon, 15 Nov 2021 05:26:31.695535000 UTC +00:00, updated_at: Mon, 15 Nov 2021 05:26:31.695535000 UTC +00:00, converted_at: nil, context: {}, namespace_id: 1> > r.experiment => <Experiment:_0x00007f7f7e6b1228_ id: 2, name: "pipeline_editor_walkthrough">
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
