Migrate EE issue events to GIET
What does this MR do and why?
Related to #410053 (closed)
Migrate EE issue events into new GIET system.
Here's the script I used for generating new files:
Click to expand
[
['g_project_management_issue_added_to_epic', 'An issue has been added to an epic'],
['g_project_management_issue_changed_epic', "An issue's epic has been changed"],
['g_project_management_issue_health_status_changed', "An issue's health status has been changed"],
['g_project_management_issue_iteration_changed', "An issue's iteration has been changed"],
['g_project_management_issue_removed_from_epic', "An issue has been removed from an epic"],
['g_project_management_issue_weight_changed', "An issue's weight has been changed"],
].each do |event_name, event_desc|
IssueEventGenerator.new([], {
event: event_name,
event_desc: event_desc,
section: 'dev',
stage: 'plan',
group: 'project_management',
mr: 'https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124431'
}).invoke_all
['28d', '7d'].each do |days|
files = Dir["ee/config/metrics/counts_#{days}/*_#{event_name}_*"]
raise StandardError, "Multiple files found: #{files}" unless files.count == 1
file_name = files.first
text = File.read(file_name)
new_contents = text.gsub(/distribution:/, "events:
- name: #{event_name}
unique: user_id\ndistribution:")
File.open(file_name, "w") {|file| file.puts new_contents }
end
end
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Set up snowplow-micro
- Trigger the events migrated here:
- Add an issue to an epic
- Remove an issue from an epic
- Change an issue's health status
- Change an issue's iteration
- Change an issue's epic
- Change an issue's weight
- Make sure that the events have been triggered with content as per their new event definition files [eg. -
category
sent asInternalEventTracking
] on thehttp://localhost:9091/micro/good
snowplow micro endpoint.
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.
Edited by Michał Wielich