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] Single Metric Viewer embeddable: error when creating job rule from anomaly click actions #183451

Closed
alvarezmelissa87 opened this issue May 14, 2024 · 1 comment · Fixed by #183554
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Anomaly Detection ML anomaly detection Feature:Embeddables Relating to the Embeddable system :ml v8.14.0 v8.15.0

Comments

@alvarezmelissa87
Copy link
Contributor

alvarezmelissa87 commented May 14, 2024

Seen in 8.14 and latest main.

Describe the bug:

When using the 'Configure job rules' action from the click action menu (when clicking on an anomaly in the single metric viewer panel in dashboards) and trying to save changes there is an error toast and the save cannot be made.

NOTE: This functionality works as expected when the panel is first created - the create flow loads all the necessary services. This bug is is seen when an SMV panel already exists when they navigate to dashboards and they attempt the action.

image

Steps to reproduce:

  1. Create an anomaly detection job
  2. Navigate to Dashboards and click Edit > Add panel > Machine Learning > Single metric viewer and select your job and config
  3. Once the panel is added and the dashboard saved, close the browser tab and open a new one.
  4. In the fresh tab - navigate to the dashboard with the SMV panel and click on an anomaly so the menu shows up.
  5. Click on 'Configure job rules' and make a change in the flyout and attempt to save
  6. See the error toast pop up

Expected behavior:
The save should happen and no error toast should appear

Screenshots (if relevant):
image

@alvarezmelissa87 alvarezmelissa87 added bug Fixes for quality problems that affect the customer experience :ml Feature:Anomaly Detection ML anomaly detection Feature:Embeddables Relating to the Embeddable system v8.14.0 v8.15.0 labels May 14, 2024
@alvarezmelissa87 alvarezmelissa87 self-assigned this May 14, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

alvarezmelissa87 added a commit that referenced this issue May 17, 2024
…nomaly click actions is successful (#183554)

## Summary

Fixes #183451

This PR updates the utils functions used by the rule editor flyout to
create/update/delete job rules. The functions now accept the services
they require in the case that they are not available.

This takes a step in the direction of removing dependency on the
dependency cache. This needs to be backported to 8.14 so trying to keep
code churn as small as possible. A next step will be to convert this
utils file to ts and wrap it up as a factory service as we've done with
other services that had dependency cache dependencies.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Anomaly Detection ML anomaly detection Feature:Embeddables Relating to the Embeddable system :ml v8.14.0 v8.15.0
Projects
None yet
3 participants