Skip to content
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]: Clean up TimeBuckets implementation #60130

Closed
6 tasks done
Tracked by #60126
lukeelmers opened this issue Mar 13, 2020 · 1 comment
Closed
6 tasks done
Tracked by #60126

[data.search.aggs]: Clean up TimeBuckets implementation #60130

lukeelmers opened this issue Mar 13, 2020 · 1 comment
Assignees
Labels
Feature:Aggregations Aggregation infrastructure (AggConfig, esaggs, ...)

Comments

@lukeelmers
Copy link
Member

lukeelmers commented Mar 13, 2020

The legacy ui/time_buckets was converted to TS & migrated to the aggs service in data.search.aggs, and exists as an implementation detail of the date histogram agg type.

However, there is a lot of cleanup that needs to be done here to remove unused methods & simplify things. This will greatly reduce the maintenance burden of this area of code:

  • update config to take explicit ui setting values
    • histogram:barTarget, histogram:maxBars, etc, instead of getConfig function
    • this will make eventual migration to the server easier
  • Remove duplicate TimeBuckets interface in the date_histogram agg type and replace with something exported from TimeBuckets
  • check to confirm whether __cached__ can be safely removed (I suspect it can as this is not a shared runtime dependency and rather the class is instantiated where it is needed, which is in multiple places)
  • Identify any unused methods & remove them if possible
    • these are usually consumed via agg.buckets, etc
  • Refactor TimeBuckets class to clean up typings
    • check the arguments provided to setInterval and see if they can be simplified based on usage across Kibana
    • TimeBucketsInterval - check interface to see if all items included are necessary and used elsewhere
  • Write unit tests for time_buckets.ts

Parent: #60126

@lukeelmers lukeelmers added Feature:Aggregations Aggregation infrastructure (AggConfig, esaggs, ...) Team:AppArch labels Mar 13, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Aggregations Aggregation infrastructure (AggConfig, esaggs, ...)
Projects
None yet
Development

No branches or pull requests

4 participants