Ensure that actions are only defined ones for internal events
What does this MR do and why?
We reduced the identifier of an event from potentially three different properties (
category
,action
andlabel
) to a single one (name
), while this makes it easier and less confusing for user, it also increases the chance of duplicates if someone chooses the samename
, this could lead to wrong data when looking at metrics.
In MR adds specs that:
- Run through all the event definitions that has category
InternalEventTracking
and make sure that none of these define the sameaction
.
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
- Copy the event
ee/config/events/g_compliance_dashboard.yml
and so that you have two event definitions withaction: g_compliance_dashboard
. - Run the spec and see it fail:
bundle exec rspec spec/lib/gitlab/tracking/event_definition_spec.rb
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.
Related to #426993 (closed)
Edited by Jonas Larsen