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

[SLO] When switching from "range" to "value_count" histogram indicator becomes invalid. #161861

Closed
simianhacker opened this issue Jul 13, 2023 · 1 comment · Fixed by #161907
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience needs-team Issues missing a team label

Comments

@simianhacker
Copy link
Member

Kibana version:
main

Original install method (e.g. download page, yum, from source, etc.):
source

Describe the bug:
When you switch between value_count and range on the form for the "Histogram metric" indicator, the preview chart show a message "The current indicator settings are invalid". The Preview API returns the following error:

Excess keys are not allowed:
body.indicator.params.good.from
body.indicator.params.good.to

Steps to reproduce:

  1. Ingest data with a histogram field
  2. Create an SLO using the "Histogram metric"
  3. Create a valid scenario where both the good and total events use value_count.
  4. Change the good events to use a range.

Expected behavior:'

You should be able to switch between each aggregation type without an error.

@simianhacker simianhacker added the bug Fixes for quality problems that affect the customer experience label Jul 13, 2023
@simianhacker simianhacker self-assigned this Jul 13, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 13, 2023
@simianhacker
Copy link
Member Author

Possible Fix: add shouldUnregister for both these fields on the Controller component.

simianhacker added a commit that referenced this issue Jul 14, 2023
## Summary

This PR fixes #161861 by adding `shouldUnregister` to the `Controller`
components for `indicator.params.from` and `indicator.params.to` to
ensure the fields are unregistered when they are unmounted.

### Testing

1. Create a new SLO using the histogram indicator.
2. Set both the  "good" and "total" events to use value count
3. Ensure the preview chart displays data
4. Set the "good" events to a range, the previous chart should update.
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 needs-team Issues missing a team label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant