-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[data.search.aggs] Remove service getters from agg types #60333
Labels
Comments
lukeelmers
added
Feature:Aggregations
Aggregation infrastructure (AggConfig, esaggs, ...)
Team:AppArch
Feature:NP Migration
labels
Mar 16, 2020
Pinging @elastic/kibana-app-arch (Team:AppArch) |
alexwizp
added a commit
to alexwizp/kibana
that referenced
this issue
Mar 24, 2020
9 tasks
alexwizp
added a commit
that referenced
this issue
Mar 27, 2020
* [data.search.aggs] Remove service getters from agg types Part of #60333 * fix JEST * fix karma:unit * fix PR commnets * fix PR comments * try to fix ci * fix CI * fix karma:unit Co-authored-by: Elastic Machine <[email protected]>
alexwizp
added a commit
to alexwizp/kibana
that referenced
this issue
Mar 27, 2020
* [data.search.aggs] Remove service getters from agg types Part of elastic#60333 * fix JEST * fix karma:unit * fix PR commnets * fix PR comments * try to fix ci * fix CI * fix karma:unit Co-authored-by: Elastic Machine <[email protected]>
alexwizp
added a commit
that referenced
this issue
Mar 27, 2020
…1582) * [data.search.aggs] Remove service getters from agg types Part of #60333 * fix JEST * fix karma:unit * fix PR commnets * fix PR comments * try to fix ci * fix CI * fix karma:unit Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
7 tasks
alexwizp
added a commit
to alexwizp/kibana
that referenced
this issue
Mar 27, 2020
elasticmachine
added a commit
to alexwizp/kibana
that referenced
this issue
Mar 27, 2020
elasticmachine
added a commit
to alexwizp/kibana
that referenced
this issue
Mar 27, 2020
elasticmachine
added a commit
to alexwizp/kibana
that referenced
this issue
Mar 28, 2020
elasticmachine
added a commit
to alexwizp/kibana
that referenced
this issue
Mar 30, 2020
elasticmachine
added a commit
to alexwizp/kibana
that referenced
this issue
Apr 1, 2020
elasticmachine
added a commit
to alexwizp/kibana
that referenced
this issue
Apr 2, 2020
alexwizp
added a commit
to alexwizp/kibana
that referenced
this issue
Apr 3, 2020
7 tasks
elasticmachine
added a commit
to alexwizp/kibana
that referenced
this issue
Apr 6, 2020
alexwizp
added a commit
that referenced
this issue
Apr 7, 2020
* [data.search.aggs] Remove service getters from agg types Part of #60333 * new portion of changes * pass dependencies to MetricAgg Type through constructor * update docs * refactoring buckets * remove unused mockDataServices * Remove service getters from metrics * Some fixes * remove temporary code * moved notifications to the getInternalStartServices * fixed karma lock * update docs * Fixed tests * fix broken CI * fix PR comment * fix typo Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Uladzislau Lasitsa <[email protected]>
alexwizp
added a commit
to alexwizp/kibana
that referenced
this issue
Apr 7, 2020
* [data.search.aggs] Remove service getters from agg types Part of elastic#60333 * new portion of changes * pass dependencies to MetricAgg Type through constructor * update docs * refactoring buckets * remove unused mockDataServices * Remove service getters from metrics * Some fixes * remove temporary code * moved notifications to the getInternalStartServices * fixed karma lock * update docs * Fixed tests * fix broken CI * fix PR comment * fix typo Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Uladzislau Lasitsa <[email protected]>
alexwizp
added a commit
that referenced
this issue
Apr 7, 2020
…2762) * [data.search.aggs] Remove service getters from agg types Part of #60333 * new portion of changes * pass dependencies to MetricAgg Type through constructor * update docs * refactoring buckets * remove unused mockDataServices * Remove service getters from metrics * Some fixes * remove temporary code * moved notifications to the getInternalStartServices * fixed karma lock * update docs * Fixed tests * fix broken CI * fix PR comment * fix typo Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Uladzislau Lasitsa <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Uladzislau Lasitsa <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
orgetFieldFormats
insrc/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
inbuckets/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
mockDataServices()
in the various unit tests can be removed and replaced with the simpler mocks provided bymocks.ts
Parent issue: #60126
The text was updated successfully, but these errors were encountered: