Disallow additional properties in event definitions
What does this MR do and why?
Changes:
- Modifies the schemas used to validate event definitions to prevent the usage of superfluous attributes
- Updates existing definition files that contain disallowed attributes
Motivation:
With the transition to internal events, more people are going to mix up the event & metric attributes.
ex) !137564 (merged) merged an event definition that included the "events" key
How to set up and validate locally
- In rails console, the below lines should return the definition objects -> not errors
Gitlab::Tracking::EventDefinition.definitions Gitlab::Usage::MetricDefinition.definitions.each_value(&:validate!)
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 Sarah Yasonik