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][Data Frame] Adding bwc tests for pivot transform #43506

Merged
merged 13 commits into from
Jul 3, 2019

Conversation

benwtrent
Copy link
Member

This adds some new BWC tests for data frame pivot transforms.

When backporting, we will have to black list these tests on clusters where the old version is before 7.2.0.

Additionally, since pipeline is not supported in 7.2.0, that field will have to be removed from the complex old cluster job.

Since it is not possible to capture all combinations of parameters efficiently, I opted to have two transforms for the Old, mixed, and new cluster tests. One with minimal viable config, and another with a config that fills out all optional fields.

@benwtrent benwtrent added >test Issues or PRs that are addressing/adding tests v8.0.0 :ml/Transform Transform v7.3.0 labels Jun 21, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

Can the test have a DF created in the old cluster and left started during upgrade? That way we check DFs left running survive a rolling upgrade. The assertion would be that task state == STARTED but it would be good to check the DF has an assignment. Can the test index more data in the upgraded cluster and restart the DF then assert the stat counts have updated. If that isn't possible in the yml test framework it can be done in Java see MlMappingsUpgradeIT

@benwtrent
Copy link
Member Author

@davidkyle I am not sure there is a reliable way to keep a DF in the STARTED state. Since we only support batch data frame transforms, we cannot keep the task around. we COULD add a bunch of data and HOPE that it does not all get processed so the data frame stays started, but that seems like it would be a very flaky test.

@benwtrent
Copy link
Member Author

@davidkyle I am attempting to add some BWC tests that have a continuous data frame running while the upgrade is going...hopefully I get it figured out :)

SeqNoStats seqNoStats = shard.getSeqNoStats();
// SeqNoStats could be `null`. This indicates that an `AlreadyClosed` exception was thrown somewhere down the stack
// Indicates that the index COULD be closed, or at least that the shard is not fully recovered yet.
if (seqNoStats == null) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@hendrikmuhs let me know what you think.

It is possible for this to throw an NPE, so to protect against that, I am still throwing a checkpoint exception with the index that failed, and that we were unable to gather seq_no_stats. The user making the call should not see any privileged information.

I opted to log the ShardStats as a warning. If that is too much information, we will have to change this to figure out how to log actionable information given the seq_no_stats being null.

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM

@benwtrent
Copy link
Member Author

@elasticmachine update branch

@benwtrent benwtrent merged commit 0f894b6 into elastic:master Jul 3, 2019
@benwtrent benwtrent deleted the feature/ml-df-add-bwc-tests branch July 3, 2019 15:07
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Jul 3, 2019
* [ML][Data Frame] Adding bwc tests for pivot transform

* adding continuous transforms

* adding continuous dataframes to bwc

* adding continuous data frame tests

* Adding rolling upgrade tests for continuous df

* Fixing test

* Adjusting indices used in BWC, and handling NPE for seq_no_stats

* updating and muting specific bwc test
benwtrent added a commit that referenced this pull request Jul 3, 2019
…43929)

* [ML][Data Frame] Adding bwc tests for pivot transform (#43506)

* [ML][Data Frame] Adding bwc tests for pivot transform

* adding continuous transforms

* adding continuous dataframes to bwc

* adding continuous data frame tests

* Adding rolling upgrade tests for continuous df

* Fixing test

* Adjusting indices used in BWC, and handling NPE for seq_no_stats

* updating and muting specific bwc test

* Adjusting bwc tests for backport
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Jul 3, 2019
…43506) (elastic#43929)

* [ML][Data Frame] Adding bwc tests for pivot transform (elastic#43506)

* [ML][Data Frame] Adding bwc tests for pivot transform

* adding continuous transforms

* adding continuous dataframes to bwc

* adding continuous data frame tests

* Adding rolling upgrade tests for continuous df

* Fixing test

* Adjusting indices used in BWC, and handling NPE for seq_no_stats

* updating and muting specific bwc test

* Adjusting bwc tests for backport
benwtrent added a commit that referenced this pull request Jul 3, 2019
…43929) (#43947)

* [ML][Data Frame] Adding bwc tests for pivot transform (#43506)

* [ML][Data Frame] Adding bwc tests for pivot transform

* adding continuous transforms

* adding continuous dataframes to bwc

* adding continuous data frame tests

* Adding rolling upgrade tests for continuous df

* Fixing test

* Adjusting indices used in BWC, and handling NPE for seq_no_stats

* updating and muting specific bwc test

* Adjusting bwc tests for backport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml/Transform Transform >test Issues or PRs that are addressing/adding tests v7.3.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants