-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Feature:AggregationsAggregation infrastructure (AggConfig, esaggs, ...)Aggregation infrastructure (AggConfig, esaggs, ...)Feature:NP Migration
Description
When aggs were migrated to the new platform data.search service, each of the runtime dependencies in the individual agg types were retrieved using service getters/setters (e.g. getUiSettings or getFieldFormats in src/plugins/data/public/services)
In practice there are very few use cases for these getters/setters, and it is good to get rid of them where we can since it makes testing & mocking more complicated.
We already have one example of how these agg types look without the getters/setters if you look at the filtersBucketAgg in buckets/filters: Basically it gets wrapped in a provider function which accepts the needed dependencies, returning the agg type instance.
-
search/aggs/buckets -
search/aggs/metrics -
search/aggs/param_types -
search/aggs/test_helpers/mock_data_services- After updating the above items, see if this mocking helper is still necessary.
- Most likely calls to
mockDataServices()in the various unit tests can be removed and replaced with the simpler mocks provided bymocks.ts
Parent issue: #60126
Metadata
Metadata
Assignees
Labels
Feature:AggregationsAggregation infrastructure (AggConfig, esaggs, ...)Aggregation infrastructure (AggConfig, esaggs, ...)Feature:NP Migration