elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.82k stars 8.21k forks source link

[Infra] Refactor ML job ID state management #171913

Open miltonhultgren opened 11 months ago

miltonhultgren commented 11 months ago

https://github.com/elastic/kibana/pull/168234 introduced a new part of the state used to generate the ID for the ML jobs for logs. This proved hard to test in an easy way so the tests introduced in that PR have been disabled.

Most likely the best solution to the issue is the refactor the state management used for the ML job IDs. Rather than storing the ID format, the log view ID and the space ID and using those pieces to generate the ID in multiple places, we would store a full version of the ID or even the full ML job object and use that across the UI and the API requests.

Once that is done, the tests would need to be refactored but the same test cases should be easier to express in that world without having to rely on capturing network traffic.

elasticmachine commented 11 months ago

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

elasticmachine commented 11 months ago

Pinging @elastic/obs-knowledge-team (Team:obs-knowledge)