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
c852a0b5
Commit
c852a0b5
authored
Mar 16, 2021
by
jejacks0n
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix version of gitlab-experiment schema
parent
d89150d5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
app/experiments/application_experiment.rb
app/experiments/application_experiment.rb
+1
-1
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+6
-1
spec/experiments/application_experiment_spec.rb
spec/experiments/application_experiment_spec.rb
+1
-1
spec/workers/post_receive_spec.rb
spec/workers/post_receive_spec.rb
+4
-1
No files found.
app/experiments/application_experiment.rb
View file @
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
...
...
spec/controllers/projects_controller_spec.rb
View file @
c852a0b5
...
@@ -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
...
...
spec/experiments/application_experiment_spec.rb
View file @
c852a0b5
...
@@ -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'
}
}
}
]
]
...
...
spec/workers/post_receive_spec.rb
View file @
c852a0b5
...
@@ -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
...
...
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