Remove "AND" operator - migrate and schema changes
What does this MR do and why?
We want to remove an unused feature. See #440599 (closed) for context.
This MR addresses item 4)-6) in the plan below and therefor concludes the removal
I found out that the generator cannot output AggregatedMetric
. So step 4) was really only to make operator
optional.
The mention of operator
is also removed from the docs, which was not mentioned in the plan but brought up here: !144857 (comment 1774490637)
The plan is to remove the feature entirely in a few steps to make reviews easier:
Remove usage of theIntersection
class from all sourcespostgres_hll
andredis_hll
Remove theIntersection
class and support for using theAND
operatorRemove all usage of theoperator
property in the code- Update generator to output metric definitions without
operator
. (Requires thatoperator
becomes optional in the json schema) - Migrate remove
operator
from all (currently 77) aggregated metric definitions - Update json schema do disallow the
operator
property
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.
How to set up and validate locally
-
Add
operator
to the metric definition:config/metrics/counts_28d/20210216174910_analytics_unique_visits_for_any_target_monthly.yml
aggregate: operator: OR # <--- Add this line attribute: user_id
-
Check that the validation fails by running:
bundle exec rspec spec/lib/gitlab/usage/metric_definition_validate_all_spec.rb
Related to #440599 (closed)