kibana icon indicating copy to clipboard operation
kibana copied to clipboard

[ML] Anomaly Detection: Fix anomaly marker click in Single Metric Viewer embeddable

Open walterra opened this issue 1 year ago • 5 comments

Summary

Part of #176651 and #153476.

Fixes the click on anomaly markers in the Single Metric Viewer embeddable. This required refactoring some dependencies to be properly passed in via React contexts instead of the legacy dependency cache.

smv-embeddable-click-0001.webm

Checklist

walterra avatar Feb 13 '24 07:02 walterra

Pinging @elastic/ml-ui (:ml)

elasticmachine avatar Feb 13 '24 16:02 elasticmachine

Gave this another test and getting blank charts now along with this toast: image

Looks like the job service has a dependency cache dependency that could be causing issues. I think it tries to use the http service from the dependency cache. Getting these errors in console:

image image

For this ^ looks like the path might be wrong - I think it should be this.context.services.mlServices.mlApiServices.results

alvarezmelissa87 avatar Feb 14 '24 17:02 alvarezmelissa87

@alvarezmelissa87 Thanks for the testing and spotting the errors!

  • The first toast is not related to this PR, you need to update your ES instance because the Kibana data views service makes use of new functionality.
  • I was able to fix mlJobService to make it work in embeddables in 3ee830d.
  • Well spotted on the wrong context access for mlApiServices.results, that one's fixed too.

walterra avatar Feb 15 '24 09:02 walterra

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

elasticmachine avatar Feb 15 '24 10:02 elasticmachine

:yellow_heart: Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 3.7MB 3.7MB +12.9KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
ml 79.0KB 78.4KB -691.0B
Unknown metric groups

async chunk count

id before after diff
ml 44 45 +1

ESLint disabled line counts

id before after diff
ml 560 563 +3

Total ESLint disabled count

id before after diff
ml 563 566 +3

History

  • :yellow_heart: Build #194071 was flaky d4e6b66aed275bef59054ede6844d9c50376e6c8
  • :yellow_heart: Build #193795 was flaky bcda5682b5a9388b52565629ed113ac257bce690
  • :broken_heart: Build #193774 failed 9333edccd633591ea00dcdca1380f631d6d6778a
  • :green_heart: Build #193662 succeeded bccd244fb9f82e32aed1e50fa7e56dff42852b6a
  • :yellow_heart: Build #193560 was flaky f57c08d870b943a8bdcb42162c21f07172ccad84
  • :broken_heart: Build #193530 failed 70ab770cc5e06985dba0dd7b86123eee21f7a72e

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

cc @walterra

kibana-ci avatar Mar 04 '24 09:03 kibana-ci