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
daefb82e
Commit
daefb82e
authored
May 05, 2021
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track users removing epic emoji
- tests - update metric dictionary Changelog: other
parent
8322da8e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
128 additions
and
10 deletions
+128
-10
doc/development/usage_ping/dictionary.md
doc/development/usage_ping/dictionary.md
+27
-3
ee/app/services/ee/award_emojis/destroy_service.rb
ee/app/services/ee/award_emojis/destroy_service.rb
+5
-0
ee/changelogs/unreleased/292253-cablett-epic-remove-emoji.yml
...hangelogs/unreleased/292253-cablett-epic-remove-emoji.yml
+5
-0
ee/config/metrics/counts_28d/20210505071850_g_project_management_users_removing_epic_emoji_monthly.yml
..._project_management_users_removing_epic_emoji_monthly.yml
+18
-0
ee/config/metrics/counts_7d/20210505071932_g_project_management_users_removing_epic_emoji_weekly.yml
...g_project_management_users_removing_epic_emoji_weekly.yml
+18
-0
ee/lib/gitlab/usage_data_counters/epic_activity_unique_counter.rb
...itlab/usage_data_counters/epic_activity_unique_counter.rb
+5
-0
ee/spec/lib/gitlab/usage_data_counters/epic_activity_unique_counter_spec.rb
.../usage_data_counters/epic_activity_unique_counter_spec.rb
+10
-0
ee/spec/services/award_emojis/destroy_service_spec.rb
ee/spec/services/award_emojis/destroy_service_spec.rb
+34
-7
lib/gitlab/usage_data_counters/known_events/epic_events.yml
lib/gitlab/usage_data_counters/known_events/epic_events.yml
+6
-0
No files found.
doc/development/usage_ping/dictionary.md
View file @
daefb82e
...
...
@@ -4692,7 +4692,7 @@ Tiers: `free`, `premium`, `ultimate`
Projects with repository mirroring enabled
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216181920_projects_mirrored_with_pipelines_enabled.yml
)
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/
ee/
config/metrics/counts_all/20210216181920_projects_mirrored_with_pipelines_enabled.yml
)
Group:
`group::continuous integration`
...
...
@@ -10532,6 +10532,30 @@ Status: `implemented`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_removing_epic_emoji_monthly`
Counts of MAU removing emoji on epic
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210505071850_g_project_management_users_removing_epic_emoji_monthly.yml
)
Group:
`group::product planning`
Status:
`implemented`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_removing_epic_emoji_weekly`
Counts of WAU removing emoji on epic
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210505071932_g_project_management_users_removing_epic_emoji_weekly.yml
)
Group:
`group::product planning`
Status:
`implemented`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_setting_epic_confidential_monthly`
Count of MAU making epics confidential
...
...
@@ -16336,7 +16360,7 @@ Tiers: `free`
Count creator_id from projects with repository mirroring enabled.
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216181934_projects_mirrored_with_pipelines_enabled.yml
)
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/
ee/
config/metrics/counts_all/20210216181934_projects_mirrored_with_pipelines_enabled.yml
)
Group:
`group::continuous integration`
...
...
@@ -18256,7 +18280,7 @@ Tiers: `free`
Count creator_id from projects with repository mirroring enabled.
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216181943_projects_mirrored_with_pipelines_enabled.yml
)
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/
ee/
config/metrics/counts_28d/20210216181943_projects_mirrored_with_pipelines_enabled.yml
)
Group:
`group::continuous integration`
...
...
ee/app/services/ee/award_emojis/destroy_service.rb
View file @
daefb82e
...
...
@@ -12,6 +12,11 @@ module EE
super
::
Gitlab
::
StatusPage
.
trigger_publish
(
project
,
current_user
,
award
)
track_epic_emoji_removed
if
awardable
.
is_a?
(
Epic
)
end
def
track_epic_emoji_removed
::
Gitlab
::
UsageDataCounters
::
EpicActivityUniqueCounter
.
track_epic_emoji_removed_action
(
author:
current_user
)
end
end
end
...
...
ee/changelogs/unreleased/292253-cablett-epic-remove-emoji.yml
0 → 100644
View file @
daefb82e
---
title
:
Track users removing epic emoji via usage ping
merge_request
:
60989
author
:
type
:
other
ee/config/metrics/counts_28d/20210505071850_g_project_management_users_removing_epic_emoji_monthly.yml
0 → 100644
View file @
daefb82e
---
key_path
:
redis_hll_counters.epics_usage.g_project_management_users_removing_epic_emoji_monthly
description
:
Counts of MAU removing emoji on epic
product_section
:
dev
product_stage
:
plan
product_group
:
group::product planning
product_category
:
epics_usage
value_type
:
number
status
:
implemented
milestone
:
"
13.12"
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/60989
time_frame
:
28d
data_source
:
redis_hll
distribution
:
-
ee
tier
:
-
premium
-
ultimate
ee/config/metrics/counts_7d/20210505071932_g_project_management_users_removing_epic_emoji_weekly.yml
0 → 100644
View file @
daefb82e
---
key_path
:
redis_hll_counters.epics_usage.g_project_management_users_removing_epic_emoji_weekly
description
:
Counts of WAU removing emoji on epic
product_section
:
dev
product_stage
:
plan
product_group
:
group::product planning
product_category
:
epics_usage
value_type
:
number
status
:
implemented
milestone
:
"
13.12"
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/60989
time_frame
:
28d
data_source
:
redis_hll
distribution
:
-
ee
tier
:
-
premium
-
ultimate
ee/lib/gitlab/usage_data_counters/epic_activity_unique_counter.rb
View file @
daefb82e
...
...
@@ -14,6 +14,7 @@ module Gitlab
EPIC_NOTE_UPDATED
=
'g_project_management_users_updating_epic_notes'
EPIC_NOTE_DESTROYED
=
'g_project_management_users_destroying_epic_notes'
EPIC_EMOJI_AWARDED
=
'g_project_management_users_awarding_epic_emoji'
EPIC_EMOJI_REMOVED
=
'g_project_management_users_removing_epic_emoji'
EPIC_START_DATE_SET_AS_FIXED
=
'g_project_management_users_setting_epic_start_date_as_fixed'
EPIC_START_DATE_SET_AS_INHERITED
=
'g_project_management_users_setting_epic_start_date_as_inherited'
EPIC_DUE_DATE_SET_AS_FIXED
=
'g_project_management_users_setting_epic_due_date_as_fixed'
...
...
@@ -62,6 +63,10 @@ module Gitlab
track_unique_action
(
EPIC_EMOJI_AWARDED
,
author
)
end
def
track_epic_emoji_removed_action
(
author
:)
track_unique_action
(
EPIC_EMOJI_REMOVED
,
author
)
end
def
track_epic_start_date_set_as_fixed_action
(
author
:)
track_unique_action
(
EPIC_START_DATE_SET_AS_FIXED
,
author
)
end
...
...
ee/spec/lib/gitlab/usage_data_counters/epic_activity_unique_counter_spec.rb
View file @
daefb82e
...
...
@@ -84,6 +84,16 @@ RSpec.describe Gitlab::UsageDataCounters::EpicActivityUniqueCounter, :clean_gitl
end
end
context
'for epic emoji remove event'
do
def
track_action
(
params
)
described_class
.
track_epic_emoji_removed_action
(
**
params
)
end
it_behaves_like
'a daily tracked issuable event'
do
let
(
:action
)
{
described_class
::
EPIC_EMOJI_REMOVED
}
end
end
context
'for epic closing event'
do
def
track_action
(
params
)
described_class
.
track_epic_closed_action
(
**
params
)
...
...
ee/spec/services/award_emojis/destroy_service_spec.rb
View file @
daefb82e
...
...
@@ -4,22 +4,24 @@ require 'spec_helper'
RSpec
.
describe
AwardEmojis
::
DestroyService
do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:group
)
{
create
(
:group
,
:public
)
}
let_it_be
(
:project
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:awardable
)
{
create
(
:note_on_issue
,
project:
project
)
}
let
(
:name
)
{
'thumbsup'
}
subjec
t
(
:service
)
{
described_class
.
new
(
awardable
,
name
,
user
)
}
le
t
(
:service
)
{
described_class
.
new
(
awardable
,
name
,
user
)
}
describe
'#execute'
do
subject
(
:execute
)
{
service
.
execute
}
before
do
create
(
:award_emoji
,
user:
user
,
name:
name
,
awardable:
awardable
)
end
describe
'publish to status page'
do
let
(
:execute
)
{
service
.
execute
}
let
(
:issue_id
)
{
awardable
.
noteable_id
}
before
do
create
(
:award_emoji
,
user:
user
,
name:
name
,
awardable:
awardable
)
end
context
'with recognized emoji'
do
let
(
:name
)
{
Gitlab
::
StatusPage
::
AWARD_EMOJI
}
...
...
@@ -32,5 +34,30 @@ RSpec.describe AwardEmojis::DestroyService do
include_examples
'no trigger status page publish'
end
end
describe
'tracking emoji removing'
do
context
'when awardable is an epic'
do
let_it_be
(
:awardable
)
{
create
(
:epic
,
group:
group
)
}
before
do
stub_licensed_features
(
epics:
true
)
group
.
add_developer
(
user
)
end
it
'tracks usage'
do
expect
(
::
Gitlab
::
UsageDataCounters
::
EpicActivityUniqueCounter
).
to
receive
(
:track_epic_emoji_removed_action
)
execute
end
end
context
'when awardable is not an epic'
do
it
'does not track epic emoji awarding'
do
expect
(
::
Gitlab
::
UsageDataCounters
::
EpicActivityUniqueCounter
).
not_to
receive
(
:track_epic_emoji_removed_action
)
execute
end
end
end
end
end
lib/gitlab/usage_data_counters/known_events/epic_events.yml
View file @
daefb82e
...
...
@@ -63,6 +63,12 @@
aggregation
:
daily
feature_flag
:
track_epics_activity
-
name
:
g_project_management_users_removing_epic_emoji
category
:
epics_usage
redis_slot
:
project_management
aggregation
:
daily
feature_flag
:
track_epics_activity
# start date events
-
name
:
g_project_management_users_setting_epic_start_date_as_fixed
...
...
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