Commit 0e8dfef6 authored by Dmitry Gruzd's avatar Dmitry Gruzd

Merge branch 'increase-gitlab-experiment-schema-version' into 'master'

Increase version of gitlab-experiment schema

See merge request gitlab-org/gitlab!56878
parents ff5fa814 c852a0b5
...@@ -27,7 +27,7 @@ class ApplicationExperiment < Gitlab::Experiment # rubocop:disable Gitlab/Namesp ...@@ -27,7 +27,7 @@ class ApplicationExperiment < Gitlab::Experiment # rubocop:disable Gitlab/Namesp
# track the event, and mix in the experiment signature data # track the event, and mix in the experiment signature data
Gitlab::Tracking.event(name, action.to_s, **event_args.merge( Gitlab::Tracking.event(name, action.to_s, **event_args.merge(
context: (event_args[:context] || []) << SnowplowTracker::SelfDescribingJson.new( context: (event_args[:context] || []) << SnowplowTracker::SelfDescribingJson.new(
'iglu:com.gitlab/gitlab_experiment/jsonschema/0-3-0', signature 'iglu:com.gitlab/gitlab_experiment/jsonschema/1-0-0', signature
) )
)) ))
end end
......
...@@ -231,7 +231,12 @@ RSpec.describe ProjectsController do ...@@ -231,7 +231,12 @@ RSpec.describe ProjectsController do
get :show, params: { namespace_id: empty_project.namespace, id: empty_project } get :show, params: { namespace_id: empty_project.namespace, id: empty_project }
expect_snowplow_event(category: 'empty_repo_upload', action: 'view_project_show', context: [{ schema: 'iglu:com.gitlab/gitlab_experiment/jsonschema/0-3-0', data: anything }], property: 'empty') expect_snowplow_event(
category: 'empty_repo_upload',
action: 'view_project_show',
property: 'empty',
context: [{ schema: 'iglu:com.gitlab/gitlab_experiment/jsonschema/1-0-0', data: anything }]
)
end end
end end
......
...@@ -114,7 +114,7 @@ RSpec.describe ApplicationExperiment, :experiment do ...@@ -114,7 +114,7 @@ RSpec.describe ApplicationExperiment, :experiment do
data: { data: '_data_' } data: { data: '_data_' }
}, },
{ {
schema: 'iglu:com.gitlab/gitlab_experiment/jsonschema/0-3-0', schema: 'iglu:com.gitlab/gitlab_experiment/jsonschema/1-0-0',
data: { experiment: 'namespaced/stub', key: '86208ac54ca798e11f127e8b23ec396a', variant: 'control' } data: { experiment: 'namespaced/stub', key: '86208ac54ca798e11f127e8b23ec396a', variant: 'control' }
} }
] ]
......
...@@ -102,7 +102,10 @@ RSpec.describe PostReceive do ...@@ -102,7 +102,10 @@ RSpec.describe PostReceive do
perform perform
expect_snowplow_event(category: 'empty_repo_upload', action: 'initial_write', context: [{ schema: 'iglu:com.gitlab/gitlab_experiment/jsonschema/0-3-0', data: anything }]) expect_snowplow_event(category: 'empty_repo_upload', action: 'initial_write', context: [{
schema: 'iglu:com.gitlab/gitlab_experiment/jsonschema/1-0-0',
data: anything
}])
end end
it 'does not track an event for the empty_repo_upload experiment when project is not empty', :snowplow do it 'does not track an event for the empty_repo_upload experiment when project is not empty', :snowplow do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment