Skip to content

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 and label) 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 same name, this could lead to wrong data when looking at metrics.

In MR adds specs that:

  1. Run through all the event definitions that has category InternalEventTracking and make sure that none of these define the same action.

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

  1. Copy the event ee/config/events/g_compliance_dashboard.yml and so that you have two event definitions with action: g_compliance_dashboard.
  2. 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.

Related to #426993 (closed)

Edited by Jonas Larsen

Merge request reports