[ML] AIOps: Refactors function argument structure for Log Rate Analysis.#187669
Merged
walterra merged 9 commits intoelastic:mainfrom Jul 8, 2024
Merged
[ML] AIOps: Refactors function argument structure for Log Rate Analysis.#187669walterra merged 9 commits intoelastic:mainfrom
walterra merged 9 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/ml-ui (:ml) |
7198b48 to
be4457b
Compare
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Any counts in public APIs
History
cc @walterra |
peteharverson
approved these changes
Jul 8, 2024
Contributor
peteharverson
left a comment
There was a problem hiding this comment.
Code LGTM - a nice refactor to make the code easier to read.
This was referenced Jul 9, 2024
3 tasks
walterra
added a commit
that referenced
this pull request
Aug 7, 2024
…189863) ## Summary Follow up to #187669. Part of #187684. Fixes #176387. (Ran the flaky test runner on AIOps functional tests) - Fixes the `size: 0` option to be properly nested for `createCategoryRequest()`. - Changes the arguments structure for `fetchTopCategories` and `fetchTopTerms` from individual arguments to an options object to be more in line with the other functions used for log rate analysis. - Adds jest unit test for `fetchTopCategories` and `fetchTopTerms`. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #178613.
Refactors the function argument structure of code used on Kibana server for Log Rate Analysis from individual arguments to single objects that contain all options. The options structure looks like this:
The main benefit is that code where these functions are used become easier to read. Instead of the strict order of args that sometimes included
undefinedor just a value where it's hard to guess for which argument it's used for, this enforces to have the names of options show up in the consuming code. Here's an example:Before:
After:
Checklist