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

[ML] automatically update deprecated datafeed aggregations #55678

Merged
merged 4 commits into from
Apr 28, 2020

Conversation

benwtrent
Copy link
Member

This creates an auto update service. The first automatic update is rewriting datafeed aggregations if they exist.

closes #51606

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

import java.util.Collections;
import java.util.Map;

public class AggProviderWireSerializationTests extends AbstractBWCWireSerializationTestCase<AggProvider> {
Copy link
Member Author

Choose a reason for hiding this comment

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

toXContent for the agg provider should only provide the agg map. This test is to make sure that we appropriate write between nodes of various versions.

.setId(datafeedConfig.getId())
.build())
.collect(Collectors.toList());
if (updates.isEmpty()) {
Copy link
Member Author

Choose a reason for hiding this comment

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

If there are no datafeed configs, that also means there won't be any updates.

This is ok, as all new datafeed configs enforce the appropriate date_histogram agg format.

Copy link
Contributor

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

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

LGTM

The framework is cool. I think there will be other uses for it soon.

I made a couple of minor comments but am happy for this to be merged without further review.

@benwtrent benwtrent merged commit 517efb7 into elastic:master Apr 28, 2020
@benwtrent benwtrent deleted the feature/ml-df-auto-update branch April 28, 2020 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] Automatically map interval to fixed/calendar interval in datafeed aggs
4 participants