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 Analytics: adds functional tests for runtime fields support #96262

Conversation

alvarezmelissa87
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 commented Apr 5, 2021

Summary

Related meta issue: #94243
Adds initial runtime fields functional tests for analytics creation wizard.

Flaky test runner build: https://kibana-ci.elastic.co/job/kibana+flaky-test-suite-runner/1428/

Checklist

Delete any items that are not applicable to this PR.

@alvarezmelissa87 alvarezmelissa87 added :ml release_note:skip Skip the PR/issue when compiling release notes Feature:Data Frame Analytics ML data frame analytics features v7.13.0 labels Apr 5, 2021
@alvarezmelissa87 alvarezmelissa87 requested a review from pheyos April 5, 2021 21:17
@alvarezmelissa87 alvarezmelissa87 requested a review from a team as a code owner April 5, 2021 21:17
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

await testSubjects.existOrFail('mlDataFrameAnalyticsAdvancedRuntimeMappingsEditor');
},

// async enableRuntimeMappingsEditor() {
Copy link
Member

Choose a reason for hiding this comment

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

Should we get rid of this commented code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh good catch - thanks 68f8857

// Not all lines may be visible in the editor and thus aceEditor may not return all lines.
// This means we might not get back valid JSON so we only test against the first few lines
// and see if the string matches.
const splicedAdvancedEditorValue = runtimeMappingsEditorString.split('\n').splice(0, 3);
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't have to be a part of this PR, but since this piece is now used multiple times across different parts of ml/transform, I wonder if it would be beneficial for us to move this chunk into MachineLearningCommonUIProvider.

JSON.stringify(testData.runtimeFields)
);
await ml.dataFrameAnalyticsCreation.applyRuntimeMappings();

Copy link
Member

Choose a reason for hiding this comment

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

Should we validate that uppercase_stab is showing up correctly in the wizard after this button is applied?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call - checked in 68f8857

JSON.stringify(testData.runtimeFields)
);
await ml.dataFrameAnalyticsCreation.applyRuntimeMappings();

Copy link
Member

Choose a reason for hiding this comment

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

Should we validate that lowercase_central_air is showing up correctly in the wizard after this button is applied?

Copy link
Member

Choose a reason for hiding this comment

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

We should probably have a check either in this test or another dedicated test if for example, the histogram charts for runtime fields like lowercase_central_air is showing up correctly once the mappings is applied.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checking in 68f8857
Agreed - this is a basic runtime fields tests. I'll add in more advanced ones in a follow up

JSON.stringify(testData.runtimeFields)
);
await ml.dataFrameAnalyticsCreation.applyRuntimeMappings();

Copy link
Member

Choose a reason for hiding this comment

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

Should we validate that uppercase_y is showing up correctly in the wizard after this button is applied?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked in 68f8857

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

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.

LGTM

@qn895
Copy link
Member

qn895 commented Apr 6, 2021

LGTM 🎉

@alvarezmelissa87 alvarezmelissa87 merged commit 40cbb1f into elastic:master Apr 6, 2021
alvarezmelissa87 added a commit to alvarezmelissa87/kibana that referenced this pull request Apr 6, 2021
…upport (elastic#96262)

* add basic runtime mapping functional tests to analyics

* confirm runtime mapping added correctly.
@alvarezmelissa87 alvarezmelissa87 deleted the ml-dfa-runtime-functional-tests branch April 6, 2021 16:12
alvarezmelissa87 added a commit that referenced this pull request Apr 6, 2021
…upport (#96262) (#96330)

* add basic runtime mapping functional tests to analyics

* confirm runtime mapping added correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Frame Analytics ML data frame analytics features :ml release_note:skip Skip the PR/issue when compiling release notes v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants