Skip to content

Remove category from Internal Events event definitions

What does this MR do and why?

As a last step to solve #435201 (closed) this MR addresses point 5) and 6) of the proposed solution.

  1. Allow event definitions to have an optional internal_events property and add it to a single event definition
  2. Make the Metric Dictionary use the internal_events property instead of category if internal_events is present
  3. Make category optional in the event definition schema. Migrate first batch of Internal Events event definitions to have no category and internal_events: true
  4. Migrate the remaining event definitions
  5. Modify the generator to output event definitions with internal_events: true instead of category: InternalEventTracking.
  6. Modify the schema to make sure category: InternalEventTracking is not allow and migrate any event definition created after step 4 above.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Create a new event with the generator and verify that it doesn't have a category but has internal_events: true.
  2. Add category: MyCategory to gitlab/config/events/p_analytics_ci_cd_deployment_frequency.yml and see that bundle exec rspec ./spec/lib/gitlab/tracking/event_definition_validate_all_spec.rb fails.

Related to #435201 (closed)

Edited by Jonas Larsen

Merge request reports