Skip to content

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

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

[9.0] [ML] AIOps: Change Point Detection in Dashboards embeddable fix (#217178)#217319
rbrtj merged 2 commits into
elastic:9.0from
rbrtj:backport/9.0/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 9.0:

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/test/tsconfig.json
@rbrtj rbrtj requested a review from kibanamachine as a code owner April 7, 2025 12:12
@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 12:12
@rbrtj rbrtj self-assigned this Apr 7, 2025
@rbrtj rbrtj merged commit 4ded4bd into elastic:9.0 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