Skip to content

[8.17] [ML] AIOps: Change Point Detection in Dashboards embeddable fix (#217178)#217315

Merged
rbrtj merged 3 commits into
elastic:8.17from
rbrtj:backport/8.17/pr-217178
Apr 7, 2025
Merged

[8.17] [ML] AIOps: Change Point Detection in Dashboards embeddable fix (#217178)#217315
rbrtj merged 3 commits into
elastic:8.17from
rbrtj:backport/8.17/pr-217178

Conversation

@rbrtj
Copy link
Copy Markdown
Contributor

@rbrtj rbrtj commented Apr 7, 2025

Backport

This will backport the following commits from main to 8.17:

Questions ?

Please refer to the Backport tool documentation

…tic#217178)

It fixes an issue where adding the `Change Point Detection` embeddable
didn't work properly.
The bug was introduced in elastic#197943
The main cause was the use of `<ChangePointDetectionContextProvider>`
which calls `timefilter.getActiveBounds()`. However, for
`getActiveBounds` to work, `this.isTimeRangeSelectorEnabled()` must
return true. By default, this is not the case within dashboards.
However, we do not actually need the `ChangePointDetectionContext`
inside the embeddable, so this PR removes its usage.
A functional test has been added to cover adding the Change Point
embeddable from the dashboards app. It's a very simple test that does
not verify the embeddable's functionality, but it could be improved in a
follow-up.

![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit d359881)

# Conflicts:
#	x-pack/plugins/aiops/public/embeddables/change_point_chart/change_point_chart_initializer.tsx
#	x-pack/test/tsconfig.json
@rbrtj rbrtj requested a review from kibanamachine as a code owner April 7, 2025 11:55
@rbrtj rbrtj added the backport This PR is a backport of another PR label Apr 7, 2025
@rbrtj rbrtj enabled auto-merge (squash) April 7, 2025 11:55
@rbrtj rbrtj self-assigned this Apr 7, 2025
@rbrtj rbrtj merged commit 815d767 into elastic:8.17 Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants