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] Add tests for anomaly embeddables migrations #116520

Merged
merged 8 commits into from
Nov 3, 2021

Conversation

qn895
Copy link
Member

@qn895 qn895 commented Oct 27, 2021

Summary

Part of #110949. This PR adds functional tests for anomaly swimlane and anomaly charts embeddable which loads a 7.15 dashboard JSON object into 8.0.0

Checklist

Delete any items that are not applicable to this PR.

@qn895
Copy link
Member Author

qn895 commented Oct 28, 2021

@elasticmachine merge upstream

@qn895 qn895 requested a review from pheyos October 28, 2021 17:58
@qn895 qn895 self-assigned this Oct 28, 2021
@qn895 qn895 mentioned this pull request Oct 28, 2021
16 tasks
@qn895
Copy link
Member Author

qn895 commented Nov 1, 2021

@elasticmachine merge upstream

@qn895 qn895 marked this pull request as ready for review November 1, 2021 13:41
@qn895 qn895 requested a review from a team as a code owner November 1, 2021 13:41
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)


describe('supports migrations', function () {
const panelTitle = `Saved ML anomaly charts for fq_multi_1_ae`;
const dashboardSavedObject = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably worth moving the saved object configs and then looping through each item in the list, making sure it can be loaded successfully. Then for 8.0, a 7.16 config can be added with minimal changes to the code required.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated here eee3561

await PageObjects.common.navigateToApp('dashboard');
});

it('loads saved dashboard from version 7.15', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could the coreMigrationVersion from the saved object config be used in the test title?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated here eee3561

@qn895 qn895 added release_note:skip Skip the PR/issue when compiling release notes v8.0.0 labels Nov 1, 2021
@qn895 qn895 changed the title [ML] Add tests for anomaly charts embeddable migrations [ML] Add tests for anomalt embeddables migrations Nov 1, 2021
@qn895 qn895 changed the title [ML] Add tests for anomalt embeddables migrations [ML] Add tests for anomaly embeddables migrations Nov 1, 2021
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested locally and overall looks good. Agree with @pheyos that the step that sets the time range is unnecessary, but other than that LGTM. Just left one extra comment about a change to the test title.


for (const testData of testDataList) {
const { dashboardSavedObject, panelTitle, type } = testData;
describe(`loads saved dashboard from version ${dashboardSavedObject.coreMigrationVersion}`, function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

This same description is used for the test below. I think it would be good to include the panelTitle in the description here too.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed - please let's not repeat this long title and have a shorter one for either the suite or the test.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated here 7e51b01

@qn895 qn895 force-pushed the ml-func-test-anomaly-dashboard-migrations branch from 4dbb311 to 7e51b01 Compare November 2, 2021 16:13
Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

LGTM

@qn895
Copy link
Member Author

qn895 commented Nov 3, 2021

@elasticmachine merge upstream

@qn895
Copy link
Member Author

qn895 commented Nov 3, 2021

Started flaky test suite runner ... successful in 40 runs ✅

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @qn895

@qn895 qn895 added the auto-backport Deprecated - use backport:version if exact versions are needed label Nov 3, 2021
@qn895 qn895 merged commit 38a511b into elastic:main Nov 3, 2021
@kibanamachine
Copy link
Contributor

The following labels were identified as gaps in your version labels and will be added automatically:

  • v8.1.0

If any of these should not be on your pull request, please manually remove them.

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Nov 3, 2021
* [ML] Add tests for anomaly charts embeddable migrations

* [ML] Broaden tests for anomaly swimlane as well

* [ML] Fix function rename

* [ML] Update tests to use bulk api

* [ML] Remove override

Co-authored-by: Kibana Machine <[email protected]>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Nov 3, 2021
* [ML] Add tests for anomaly charts embeddable migrations

* [ML] Broaden tests for anomaly swimlane as well

* [ML] Fix function rename

* [ML] Update tests to use bulk api

* [ML] Remove override

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0
7.16

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Nov 3, 2021
* [ML] Add tests for anomaly charts embeddable migrations

* [ML] Broaden tests for anomaly swimlane as well

* [ML] Fix function rename

* [ML] Update tests to use bulk api

* [ML] Remove override

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Quynh Nguyen <[email protected]>
@walterra walterra mentioned this pull request Nov 4, 2021
13 tasks
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 4, 2021
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 4, 2021
kibanamachine added a commit that referenced this pull request Nov 4, 2021
* [ML] Add tests for anomaly charts embeddable migrations

* [ML] Broaden tests for anomaly swimlane as well

* [ML] Fix function rename

* [ML] Update tests to use bulk api

* [ML] Remove override

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Quynh Nguyen <[email protected]>
@qn895 qn895 deleted the ml-func-test-anomaly-dashboard-migrations branch November 10, 2021 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Anomaly Detection ML anomaly detection :ml release_note:skip Skip the PR/issue when compiling release notes test_ui_functional v7.16.0 v7.16.1 v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants