Commit graph

4 commits

Author SHA1 Message Date
Walter Rafelsberger
211a11bb72
[ML] AIOps Log Rate Analysis: Replace custom global state management with Redux Toolkit. (#180969) 2024-06-13 11:25:22 +02:00
Walter Rafelsberger
a79d2011cc
[ML] AIOps: Remove v1 of log rate analysis API. (#181803)
## Summary

Follow up to #170274. Part of #181111 and #181603.

We had v1 and v2 of the log rate analysis API for a while now (Nov 23).
Originally we did this to practice API versioning for serverless. Enough
time has passed so we can remove v1 which this PR does.

### 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] 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)
2024-04-26 23:05:51 +02:00
Walter Rafelsberger
bb33a8e78b
[ML] AIOps: Move code from plugins/aiops/common to packages. (#179178)
## Summary

This moves code from `plugins/aiops/common` to packages. The `aiops`
plugin will from now on have only a `server` and `public` directory.
This is in preparation for additional AIOps related public APIs and to
avoid cyclic dependency problems for other consuming plugins.

- Package `@kbn/aiops-utils` was renamed to `@kbn/aiops-common`.
- For each AIOps feature a package was created:
`@kbn/aiops-change-point-detection`, `@kbn/aiops-log-pattern-analysis`
and `@kbn/aiops-log-rate-analysis`.

### Checklist

- [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)
2024-03-28 18:40:36 +01:00
Walter Rafelsberger
ce0114b3d6
[ML] AIOps: Log Rate Analysis V2 REST API, replaces references to term with item. (#170274)
This PR uses [conditional
types](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html)
to allow the handling of both multiple API versions within one route handler. The more tricky bit turned out
to be not the updated request body, but the response since it is an
NDJSON stream where some messages were updated. In this case also the
functions that create these messages were updated with conditional types
to be able to create a message that fits the definition of the API
version.

The API integration tests originally had these message identifiers in
the `expected` section of their `testData`. I changed that to use helper
functions that retrieve the expected messages from the stream according
to the expected version. All API integration tests are run on both
versions. The functional tests are run only on the newer version since
the UI is expected to work with version `2` only.
2023-11-10 13:57:59 +01:00