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] Explain Log Rate Spikes: Additional API integration tests #146113

Merged
merged 12 commits into from
Nov 24, 2022

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Nov 23, 2022

Summary

Part of #142456.

Additional API integration tests.

  • The test data was moved to its own file test_data.ts and types for its structure defined in types.ts to be in line with the structure used for functional tests.
  • The file that runs the test was extended so it can run an array of test data definitions.
  • The datasets used in the funcional tests (ecommerce with some additional documents added to create a significant spike and the computationally generated spike data set to create distinct groups) were moved to a service ExplainLogRateSpikesDataGenerator so they can be generated and used across functional and API integration tests.
  • The computationally generated spike data set artificial_logs_with_spike is now also used for API integration tests.
  • Additional assertions have been added to check the grouping result. ecommerce does not return any groups whereas artificial_logs_with_spike does.
  • The functional tests code is now consolidated and one test file is able to run multiple test data definitions too.

Checklist

@walterra walterra self-assigned this Nov 23, 2022
@walterra walterra added v8.6.0 v8.7.0 :ml Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis labels Nov 23, 2022
@walterra
Copy link
Contributor Author

walterra commented Nov 23, 2022

Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1590

🟧 49/50 passed with one unrelated failure (we can only run all x-pack API integration at once not just the aiops ones)

@walterra walterra mentioned this pull request Nov 23, 2022
12 tasks
@walterra walterra marked this pull request as ready for review November 23, 2022 11:22
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@walterra walterra added the release_note:skip Skip the PR/issue when compiling release notes label Nov 23, 2022
@alvarezmelissa87
Copy link
Contributor

Code LGTM but not sure if the flaky test runner failure needs to be addressed

@walterra
Copy link
Contributor Author

I kicked off another flaky test runner, the failed test is unrelated to this PR though, unfortunately AFAIK we can only run all x-pack API integration tests at once not just the aiops ones.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 109 115 +6
securitySolution 443 449 +6
total +20

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 68 74 +6
osquery 110 117 +7
securitySolution 520 526 +6
total +21

History

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

cc @walterra

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 🚀

@walterra
Copy link
Contributor Author

✅ In the latest flaky test runner all tests passed: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1595

@walterra walterra merged commit 5481f07 into elastic:main Nov 24, 2022
@walterra walterra deleted the ml-aiops-dataset-3 branch November 24, 2022 09:41
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 24, 2022
…ic#146113)

Additional API integration tests.

- The test data was moved to its own file `test_data.ts` and types for
its structure defined in `types.ts` to be in line with the structure
used for functional tests.
- The file that runs the test was extended so it can run an array of
test data definitions.
- The datasets used in the funcional tests (`ecommerce` with some
additional documents added to create a significant spike and the
computationally generated spike data set to create distinct groups) were
moved to a service `ExplainLogRateSpikesDataGenerator` so they can be
generated and used across functional and API integration tests.
- The computationally generated spike data set
`artificial_logs_with_spike` is now also used for API integration tests.
- Additional assertions have been added to check the grouping result.
`ecommerce` does not return any groups whereas
`artificial_logs_with_spike` does.
- The functional tests code is now consolidated and one test file is
able to run multiple test data definitions too.

(cherry picked from commit 5481f07)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.6

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 24, 2022
…146113) (#146263)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[ML] Explain Log Rate Spikes: Additional API integration tests
(#146113)](#146113)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Walter
Rafelsberger","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-11-24T09:41:11Z","message":"[ML]
Explain Log Rate Spikes: Additional API integration tests
(#146113)\n\nAdditional API integration tests.\r\n\r\n- The test data
was moved to its own file `test_data.ts` and types for\r\nits structure
defined in `types.ts` to be in line with the structure\r\nused for
functional tests.\r\n- The file that runs the test was extended so it
can run an array of\r\ntest data definitions.\r\n- The datasets used in
the funcional tests (`ecommerce` with some\r\nadditional documents added
to create a significant spike and the\r\ncomputationally generated spike
data set to create distinct groups) were\r\nmoved to a service
`ExplainLogRateSpikesDataGenerator` so they can be\r\ngenerated and used
across functional and API integration tests.\r\n- The computationally
generated spike data set\r\n`artificial_logs_with_spike` is now also
used for API integration tests.\r\n- Additional assertions have been
added to check the grouping result.\r\n`ecommerce` does not return any
groups whereas\r\n`artificial_logs_with_spike` does.\r\n- The functional
tests code is now consolidated and one test file is\r\nable to run
multiple test data definitions
too.","sha":"5481f07f79e6923a982ae5ce42af051630b10646","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","Feature:ML/AIOps","v8.6.0","v8.7.0"],"number":146113,"url":"https://github.com/elastic/kibana/pull/146113","mergeCommit":{"message":"[ML]
Explain Log Rate Spikes: Additional API integration tests
(#146113)\n\nAdditional API integration tests.\r\n\r\n- The test data
was moved to its own file `test_data.ts` and types for\r\nits structure
defined in `types.ts` to be in line with the structure\r\nused for
functional tests.\r\n- The file that runs the test was extended so it
can run an array of\r\ntest data definitions.\r\n- The datasets used in
the funcional tests (`ecommerce` with some\r\nadditional documents added
to create a significant spike and the\r\ncomputationally generated spike
data set to create distinct groups) were\r\nmoved to a service
`ExplainLogRateSpikesDataGenerator` so they can be\r\ngenerated and used
across functional and API integration tests.\r\n- The computationally
generated spike data set\r\n`artificial_logs_with_spike` is now also
used for API integration tests.\r\n- Additional assertions have been
added to check the grouping result.\r\n`ecommerce` does not return any
groups whereas\r\n`artificial_logs_with_spike` does.\r\n- The functional
tests code is now consolidated and one test file is\r\nable to run
multiple test data definitions
too.","sha":"5481f07f79e6923a982ae5ce42af051630b10646"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146113","number":146113,"mergeCommit":{"message":"[ML]
Explain Log Rate Spikes: Additional API integration tests
(#146113)\n\nAdditional API integration tests.\r\n\r\n- The test data
was moved to its own file `test_data.ts` and types for\r\nits structure
defined in `types.ts` to be in line with the structure\r\nused for
functional tests.\r\n- The file that runs the test was extended so it
can run an array of\r\ntest data definitions.\r\n- The datasets used in
the funcional tests (`ecommerce` with some\r\nadditional documents added
to create a significant spike and the\r\ncomputationally generated spike
data set to create distinct groups) were\r\nmoved to a service
`ExplainLogRateSpikesDataGenerator` so they can be\r\ngenerated and used
across functional and API integration tests.\r\n- The computationally
generated spike data set\r\n`artificial_logs_with_spike` is now also
used for API integration tests.\r\n- Additional assertions have been
added to check the grouping result.\r\n`ecommerce` does not return any
groups whereas\r\n`artificial_logs_with_spike` does.\r\n- The functional
tests code is now consolidated and one test file is\r\nable to run
multiple test data definitions
too.","sha":"5481f07f79e6923a982ae5ce42af051630b10646"}}]}] BACKPORT-->

Co-authored-by: Walter Rafelsberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml release_note:skip Skip the PR/issue when compiling release notes v8.6.0 v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants