Adding a metric without a definition doesn't fail `every_metric_definition_spec.rb` specs
What does this MR do and why?
Related to #366844 (closed)
We're adding a fix to one of our tests, as we found an edge case for which it didn't catch issues [explained further in validation steps].
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
- Add a new metric to Usage Ping without adding its definition, for example: change line 77 in usage_data.rb to
undefined_metric: 1, assignee_lists: count(List.assignee),
- Run the specs edited in this MR - https://gitlab.com/gitlab-org/gitlab/blob/master/ee/spec/config/metrics/every_metric_definition_spec.rb
- This spec should pass on
master
branch and fail on this MR's branch.
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