Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
579baf6b
Commit
579baf6b
authored
Jan 05, 2021
by
Mayra Cabrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch '294462-fix-reinstate-49244' into 'master'"
This reverts merge request !50312
parent
75424b0f
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
5 additions
and
199 deletions
+5
-199
config/feature_flags/experiment/null_hypothesis.yml
config/feature_flags/experiment/null_hypothesis.yml
+0
-0
ee/config/feature_flags/experiment/ci_notification_dot_experiment_percentage.yml
.../experiment/ci_notification_dot_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/ci_syntax_templates_experiment_percentage.yml
.../experiment/ci_syntax_templates_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/contact_sales_btn_in_app_experiment_percentage.yml
...riment/contact_sales_btn_in_app_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/customize_homepage_experiment_percentage.yml
...s/experiment/customize_homepage_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/default_to_issues_board_experiment_percentage.yml
...eriment/default_to_issues_board_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/group_only_trials_experiment_percentage.yml
...gs/experiment/group_only_trials_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/invite_members_empty_group_version_a_experiment_percentage.yml
...e_members_empty_group_version_a_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/invite_members_empty_project_version_a_experiment_percentage.yml
...members_empty_project_version_a_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/invite_members_new_dropdown_experiment_percentage.yml
...ent/invite_members_new_dropdown_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/invite_members_version_a_experiment_percentage.yml
...riment/invite_members_version_a_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/invite_members_version_b_experiment_percentage.yml
...riment/invite_members_version_b_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/jobs_empty_state_experiment_percentage.yml
...ags/experiment/jobs_empty_state_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/onboarding_issues_experiment_percentage.yml
...gs/experiment/onboarding_issues_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/pipelines_empty_state_experiment_percentage.yml
...xperiment/pipelines_empty_state_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/remove_known_trial_form_fields_experiment_percentage.yml
.../remove_known_trial_form_fields_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/trial_during_signup_experiment_percentage.yml
.../experiment/trial_during_signup_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/trial_onboarding_issues_experiment_percentage.yml
...eriment/trial_onboarding_issues_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/trial_registration_with_social_signin_experiment_percentage.yml
...registration_with_social_signin_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/trimmed_skip_trial_copy_experiment_percentage.yml
...eriment/trimmed_skip_trial_copy_experiment_percentage.yml
+0
-8
ee/config/feature_flags/experiment/upgrade_link_in_user_menu_a_experiment_percentage.yml
...ent/upgrade_link_in_user_menu_a_experiment_percentage.yml
+0
-8
ee/spec/requests/api/experiments_spec.rb
ee/spec/requests/api/experiments_spec.rb
+0
-2
lib/feature/shared.rb
lib/feature/shared.rb
+0
-2
lib/gitlab/experimentation/experiment.rb
lib/gitlab/experimentation/experiment.rb
+3
-17
spec/lib/gitlab/experimentation/experiment_spec.rb
spec/lib/gitlab/experimentation/experiment_spec.rb
+2
-4
spec/lib/gitlab/experimentation_spec.rb
spec/lib/gitlab/experimentation_spec.rb
+0
-2
spec/support/helpers/stub_experiments.rb
spec/support/helpers/stub_experiments.rb
+0
-8
spec/support/helpers/stub_feature_flags.rb
spec/support/helpers/stub_feature_flags.rb
+0
-4
No files found.
ee/
config/feature_flags/experiment/null_hypothesis.yml
→
config/feature_flags/experiment/null_hypothesis.yml
View file @
579baf6b
File moved
ee/config/feature_flags/experiment/ci_notification_dot_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
ci_notification_dot_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27626
rollout_issue_url
:
https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/101
milestone
:
'
12.10'
type
:
experiment
group
:
group::expansion
default_enabled
:
false
ee/config/feature_flags/experiment/ci_syntax_templates_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
ci_syntax_templates_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48141
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/281057
milestone
:
'
13.8'
type
:
experiment
group
:
group::activation
default_enabled
:
false
ee/config/feature_flags/experiment/contact_sales_btn_in_app_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
contact_sales_btn_in_app_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38508
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/238207
milestone
:
'
13.3'
type
:
experiment
group
:
group::conversion
default_enabled
:
true
ee/config/feature_flags/experiment/customize_homepage_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
customize_homepage_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39348
rollout_issue_url
:
https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/187
milestone
:
'
13.4'
type
:
experiment
group
:
group::expansion
default_enabled
:
false
ee/config/feature_flags/experiment/default_to_issues_board_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
default_to_issues_board_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43939
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/268298
milestone
:
'
13.5'
type
:
experiment
group
:
group::conversion
default_enabled
:
true
ee/config/feature_flags/experiment/group_only_trials_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
group_only_trials_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40564
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/258629
milestone
:
'
13.5'
type
:
experiment
group
:
group::conversion
default_enabled
:
false
ee/config/feature_flags/experiment/invite_members_empty_group_version_a_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
invite_members_empty_group_version_a_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45689
rollout_issue_url
:
https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/280
milestone
:
'
13.6'
type
:
experiment
group
:
group::expansion
default_enabled
:
false
ee/config/feature_flags/experiment/invite_members_empty_project_version_a_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
invite_members_empty_project_version_a_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49588
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/262014
milestone
:
'
13.7'
type
:
experiment
group
:
group::expansion
default_enabled
:
false
ee/config/feature_flags/experiment/invite_members_new_dropdown_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
invite_members_new_dropdown_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50069
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/268129
milestone
:
'
13.8'
type
:
experiment
group
:
group::expansion
default_enabled
:
false
ee/config/feature_flags/experiment/invite_members_version_a_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
invite_members_version_a_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45689/
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/219239
milestone
:
'
13.6'
type
:
experiment
group
:
group::expansion
default_enabled
:
false
ee/config/feature_flags/experiment/invite_members_version_b_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
invite_members_version_b_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43900
rollout_issue_url
:
https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/214
milestone
:
'
13.5'
type
:
experiment
group
:
group::expansion
default_enabled
:
false
ee/config/feature_flags/experiment/jobs_empty_state_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
jobs_empty_state_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48686
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/281054
milestone
:
'
13.7'
type
:
experiment
group
:
group::activation
default_enabled
:
false
ee/config/feature_flags/experiment/onboarding_issues_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
onboarding_issues_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31656/
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/224515
milestone
:
'
13.0'
type
:
experiment
group
:
group::conversion
default_enabled
:
true
ee/config/feature_flags/experiment/pipelines_empty_state_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
pipelines_empty_state_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47952
rollout_issue_url
:
https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/289
milestone
:
'
13.8'
type
:
experiment
group
:
group::activation
default_enabled
:
false
ee/config/feature_flags/experiment/remove_known_trial_form_fields_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
remove_known_trial_form_fields_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45634/
rollout_issue_url
:
https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/281
milestone
:
'
13.7'
type
:
experiment
group
:
group::conversion
default_enabled
:
false
ee/config/feature_flags/experiment/trial_during_signup_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
trial_during_signup_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45147/
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/251231
milestone
:
'
13.8'
type
:
experiment
group
:
group::conversion
default_enabled
:
false
ee/config/feature_flags/experiment/trial_onboarding_issues_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
trial_onboarding_issues_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48052
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/276703
milestone
:
'
13.8'
type
:
experiment
group
:
group::conversion
default_enabled
:
false
ee/config/feature_flags/experiment/trial_registration_with_social_signin_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
trial_registration_with_social_signin_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45633
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/262853
milestone
:
'
13.7'
type
:
experiment
group
:
group::conversion
default_enabled
:
false
ee/config/feature_flags/experiment/trimmed_skip_trial_copy_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
trimmed_skip_trial_copy_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48110
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/284956
milestone
:
'
13.7'
type
:
experiment
group
:
group::conversion
default_enabled
:
false
ee/config/feature_flags/experiment/upgrade_link_in_user_menu_a_experiment_percentage.yml
deleted
100644 → 0
View file @
75424b0f
---
name
:
upgrade_link_in_user_menu_a_experiment_percentage
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29428
rollout_issue_url
:
https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/126
milestone
:
'
13.0'
type
:
experiment
group
:
group::expansion
default_enabled
:
false
ee/spec/requests/api/experiments_spec.rb
View file @
579baf6b
...
...
@@ -20,8 +20,6 @@ RSpec.describe API::Experiments do
end
before
do
skip_feature_flags_yaml_validation
skip_default_enabled_yaml_check
stub_const
(
'Gitlab::Experimentation::EXPERIMENTS'
,
experiments
)
Feature
.
enable_percentage_of_time
(
'experiment_1_experiment_percentage'
,
10
)
Feature
.
disable
(
'experiment_2_experiment_percentage'
)
...
...
lib/feature/shared.rb
View file @
579baf6b
...
...
@@ -57,8 +57,6 @@ class Feature
default_enabled:
false
,
example:
<<-
EOS
experiment(:my_experiment, project: project, actor: current_user) { ...variant code... }
# or
Gitlab::Experimentation.in_experiment_group?(:my_experiment, subject: current_user)
EOS
}
}.
freeze
...
...
lib/gitlab/experimentation/experiment.rb
View file @
579baf6b
...
...
@@ -3,21 +3,17 @@
module
Gitlab
module
Experimentation
class
Experiment
FEATURE_FLAG_SUFFIX
=
"_experiment_percentage"
attr_reader
:key
,
:tracking_category
,
:use_backwards_compatible_subject_index
def
initialize
(
key
,
**
params
)
@key
=
key
@tracking_category
=
params
[
:tracking_category
]
@use_backwards_compatible_subject_index
=
params
[
:use_backwards_compatible_subject_index
]
@experiment_percentage
=
Feature
.
get
(
:"
#{
key
}
_experiment_percentage"
).
percentage_of_time_value
# rubocop:disable Gitlab/AvoidFeatureGet
end
def
active?
# TODO: just touch a feature flag
# Temporary change, we will change `experiment_percentage` in future to `Feature.enabled?
Feature
.
enabled?
(
feature_flag_name
,
type: :experiment
,
default_enabled: :yaml
)
::
Gitlab
.
dev_env_or_com?
&&
experiment_percentage
>
0
end
...
...
@@ -29,17 +25,7 @@ module Gitlab
private
def
experiment_percentage
feature_flag
.
percentage_of_time_value
end
def
feature_flag
Feature
.
get
(
feature_flag_name
)
# rubocop:disable Gitlab/AvoidFeatureGet
end
def
feature_flag_name
:"
#{
key
}#{
FEATURE_FLAG_SUFFIX
}
"
end
attr_reader
:experiment_percentage
end
end
end
spec/lib/gitlab/experimentation/experiment_spec.rb
View file @
579baf6b
...
...
@@ -14,10 +14,8 @@ RSpec.describe Gitlab::Experimentation::Experiment do
end
before
do
skip_feature_flags_yaml_validation
skip_default_enabled_yaml_check
feature
=
double
(
'FeatureFlag'
,
percentage_of_time_value:
percentage
,
enabled?:
true
)
allow
(
Feature
).
to
receive
(
:get
).
with
(
:experiment_key_experiment_percentage
).
and_return
(
feature
)
feature
=
double
(
'FeatureFlag'
,
percentage_of_time_value:
percentage
)
expect
(
Feature
).
to
receive
(
:get
).
with
(
:experiment_key_experiment_percentage
).
and_return
(
feature
)
end
subject
(
:experiment
)
{
described_class
.
new
(
:experiment_key
,
**
params
)
}
...
...
spec/lib/gitlab/experimentation_spec.rb
View file @
579baf6b
...
...
@@ -38,8 +38,6 @@ RSpec.describe Gitlab::Experimentation do
}
})
skip_feature_flags_yaml_validation
skip_default_enabled_yaml_check
Feature
.
enable_percentage_of_time
(
:backwards_compatible_test_experiment_experiment_percentage
,
enabled_percentage
)
Feature
.
enable_percentage_of_time
(
:test_experiment_experiment_percentage
,
enabled_percentage
)
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
...
...
spec/support/helpers/stub_experiments.rb
View file @
579baf6b
...
...
@@ -11,7 +11,6 @@ module StubExperiments
allow
(
Gitlab
::
Experimentation
).
to
receive
(
:active?
).
and_call_original
experiments
.
each
do
|
experiment_key
,
enabled
|
Feature
.
persist_used!
(
"
#{
experiment_key
}#{
feature_flag_suffix
}
"
)
allow
(
Gitlab
::
Experimentation
).
to
receive
(
:active?
).
with
(
experiment_key
)
{
enabled
}
end
end
...
...
@@ -26,14 +25,7 @@ module StubExperiments
allow
(
Gitlab
::
Experimentation
).
to
receive
(
:in_experiment_group?
).
and_call_original
experiments
.
each
do
|
experiment_key
,
enabled
|
Feature
.
persist_used!
(
"
#{
experiment_key
}#{
feature_flag_suffix
}
"
)
allow
(
Gitlab
::
Experimentation
).
to
receive
(
:in_experiment_group?
).
with
(
experiment_key
,
anything
)
{
enabled
}
end
end
private
def
feature_flag_suffix
Gitlab
::
Experimentation
::
Experiment
::
FEATURE_FLAG_SUFFIX
end
end
spec/support/helpers/stub_feature_flags.rb
View file @
579baf6b
...
...
@@ -66,8 +66,4 @@ module StubFeatureFlags
def
skip_feature_flags_yaml_validation
allow
(
Feature
::
Definition
).
to
receive
(
:valid_usage!
)
end
def
skip_default_enabled_yaml_check
allow
(
Feature
::
Definition
).
to
receive
(
:default_enabled?
).
and_return
(
false
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment