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

[Rollup] Move toBuilders() methods out of rollup config objects #32585

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Aug 2, 2018

This pull request removes the toBuilders() methods from the rollup configuration objects. This way they do not rely on aggregation value sources anymore and do not expose a toBuilders() method that is tighlty coupled to the rollup indexer.

@tlrx tlrx added review v7.0.0 >refactoring :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data v6.5.0 labels Aug 2, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@tlrx tlrx requested review from polyfractal and jimczi August 2, 2018 13:31
Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this one, I think it makes sense to keep it inside the config builders. They create values source for a composite aggregation , that's the only thing they need to do. @polyfractal WDYT ?

@polyfractal
Copy link
Contributor

Urgh, I'm conflicted on all three of these. I generally like asking the config object to transform itself into different representations, rather than relying on external objects to transform the config object. E.g. if there's a change to the config (like if we decided to support min_doc_count or something on a particular agg), we only have a single location to update instead of hunting for all the places that derive objects from the config.

That said, I understand not wanting to expose these to the user. I don't know enough about how the HLRC works right now... do we have to use the same config objects in both server and HLRC? Can we have a "user version" of the config and our internal version?

Won't the HLRC already have access to the composite VS builders, since a user would need them to create a composite agg?

@tlrx tlrx force-pushed the move-toabuilders-methods-out-of-rollup-config-objects branch from 1482f85 to c530b9a Compare August 20, 2018 16:57
@tlrx
Copy link
Member Author

tlrx commented Aug 20, 2018

With the recent discussions around the HLRC maybe it's interesting to move the toBuilders methods from the configuration objects. What do you think @polyfractal ?

Copy link
Contributor

@polyfractal polyfractal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we chatted about this and decided that while it's not ideal to move these out of the config objects... it's probably better than having the scattered all over the HLRC in a different package.

At least this way the logic stays in the rollup package.

👍

@tlrx tlrx force-pushed the move-toabuilders-methods-out-of-rollup-config-objects branch from c530b9a to ed04fac Compare August 24, 2018 14:50
@tlrx tlrx merged commit e1e8cf3 into elastic:master Aug 27, 2018
@tlrx
Copy link
Member Author

tlrx commented Aug 27, 2018

Thanks @polyfractal !

@tlrx tlrx deleted the move-toabuilders-methods-out-of-rollup-config-objects branch August 27, 2018 07:38
jasontedor added a commit that referenced this pull request Aug 27, 2018
* master:
  Adjust BWC version on mapping version
  Token API supports the client_credentials grant (#33106)
  Build: forked compiler max memory matches jvmArgs (#33138)
  Introduce mapping version to index metadata (#33147)
  SQL: Enable aggregations to create a separate bucket for missing values (#32832)
  Fix grammar in contributing docs
  SECURITY: Fix Compile Error in ReservedRealmTests (#33166)
  APM server monitoring (#32515)
  Support only string `format` in date, root object & date range (#28117)
  [Rollup] Move toBuilders() methods out of rollup config objects (#32585)
  Fix forbiddenapis on java 11  (#33116)
  Apply publishing to genreate pom (#33094)
  Have circuit breaker succeed on unknown mem usage
  Do not lose default mapper on metadata updates (#33153)
  Fix a mappings update test (#33146)
  Reload Secure Settings REST specs & docs (#32990)
  Refactor CachingUsernamePassword realm (#32646)
jasontedor added a commit that referenced this pull request Aug 27, 2018
* 6.x:
  Introduce mapping version to index metadata (#33147)
  Move non duplicated actions back into xpack core (#32952)
  HLRC: Create server agnostic request and response (#32912)
  Build: forked compiler max memory matches jvmArgs (#33138)
  * Added breaking change section for GROUP BY behavior: now it considers null or empty values as a separate group/bucket. Previously, they were ignored. * This is part of backporting of #32832
  SQL: Enable aggregations to create a separate bucket for missing values (#32832)
  [TEST] version guard for reload rest-api-spec
  Fix grammar in contributing docs
  APM server monitoring (#32515)
  Support only string `format` in date, root object & date range (#28117)
  [Rollup] Move toBuilders() methods out of rollup config objects (#32585)
  Accept Gradle build scan agreement (#30645)
  Fix forbiddenapis on java 11  (#33116)
  Run forbidden api checks with runtimeJavaVersion (#32947)
  Apply publishing to genreate pom (#33094)
  Fix a mappings update test (#33146)
  Reload Secure Settings REST specs & docs (#32990)
  Refactor CachingUsernamePassword realm (#32646)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>refactoring :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data v6.5.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants