Skip to content

[ML] AIOps: Change Point Detection in Dashboards embeddable fix#217178

Merged
rbrtj merged 4 commits into
elastic:mainfrom
rbrtj:ml-change-point-embeddable-fix
Apr 7, 2025
Merged

[ML] AIOps: Change Point Detection in Dashboards embeddable fix#217178
rbrtj merged 4 commits into
elastic:mainfrom
rbrtj:ml-change-point-embeddable-fix

Conversation

@rbrtj
Copy link
Copy Markdown
Contributor

@rbrtj rbrtj commented Apr 4, 2025

It fixes an issue where adding the Change Point Detection embeddable didn't work properly.
The bug was introduced in #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

@rbrtj rbrtj requested a review from a team as a code owner April 4, 2025 12:19
@rbrtj rbrtj self-assigned this Apr 4, 2025
@rbrtj rbrtj added release_note:fix Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis backport:version Backport to applied version labels v9.0.0 v8.17.5 labels Apr 4, 2025
@rbrtj rbrtj requested review from darnautov and peteharverson April 4, 2025 12:22
Comment thread x-pack/test/functional/services/aiops/dashboard_embeddables.ts Outdated
Comment thread x-pack/test/functional/services/aiops/dashboard_embeddables.ts Outdated
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@rbrtj rbrtj requested a review from darnautov April 4, 2025 14:00
Copy link
Copy Markdown
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested and confirmed that I no longer see the error when adding a change point embeddable to an empty dashboard set to Last 15 minutes.

Copy link
Copy Markdown
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@csr csr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x-pack/test/tsconfig.json LGTM!

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 605 589 -16

Async chunks

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

id before after diff
aiops 452.1KB 446.5KB -5.5KB

Page load bundle

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

id before after diff
aiops 17.4KB 17.4KB -17.0B

History

cc @rbrtj

@rbrtj rbrtj merged commit d359881 into elastic:main Apr 7, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.17, 8.18, 8.x, 9.0

https://github.com/elastic/kibana/actions/runs/14306455713

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
8.17 Backport failed because of merge conflicts
8.18 Backport failed because of merge conflicts
8.x Backport failed because of merge conflicts
9.0 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 217178

Questions ?

Please refer to the Backport tool documentation

@darnautov darnautov added v9.0.1 and removed v9.0.0 labels Apr 7, 2025
@rbrtj
Copy link
Copy Markdown
Contributor Author

rbrtj commented Apr 7, 2025

💚 All backports created successfully

Status Branch Result
8.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

rbrtj added a commit to rbrtj/kibana that referenced this pull request Apr 7, 2025
…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
Copy link
Copy Markdown
Contributor Author

rbrtj commented Apr 7, 2025

💚 All backports created successfully

Status Branch Result
8.18

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

rbrtj added a commit to rbrtj/kibana that referenced this pull request Apr 7, 2025
…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/platform/plugins/shared/aiops/public/embeddables/change_point_chart/change_point_chart_initializer.tsx
#	x-pack/test/tsconfig.json
@rbrtj
Copy link
Copy Markdown
Contributor Author

rbrtj commented Apr 7, 2025

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

rbrtj added a commit to rbrtj/kibana that referenced this pull request Apr 7, 2025
…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/platform/plugins/shared/aiops/public/embeddables/change_point_chart/change_point_chart_initializer.tsx
#	x-pack/test/tsconfig.json
@rbrtj
Copy link
Copy Markdown
Contributor Author

rbrtj commented Apr 7, 2025

💚 All backports created successfully

Status Branch Result
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

rbrtj added a commit to rbrtj/kibana that referenced this pull request Apr 7, 2025
…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 added a commit that referenced this pull request Apr 7, 2025
…#217178) (#217319)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[ML] AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)](#217178)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-07T10:06:30Z","message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:ML/AIOps","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1","v8.17.5"],"title":"[ML]
AIOps: Change Point Detection in Dashboards embeddable
fix","number":217178,"url":"https://github.com/elastic/kibana/pull/217178","mergeCommit":{"message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217178","number":217178,"mergeCommit":{"message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/217318","number":217318,"state":"OPEN"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/217316","number":217316,"state":"OPEN"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/217315","number":217315,"state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
rbrtj added a commit that referenced this pull request Apr 7, 2025
#217178) (#217316)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[ML] AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)](#217178)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-07T10:06:30Z","message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:ML/AIOps","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1","v8.17.5"],"title":"[ML]
AIOps: Change Point Detection in Dashboards embeddable
fix","number":217178,"url":"https://github.com/elastic/kibana/pull/217178","mergeCommit":{"message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217178","number":217178,"mergeCommit":{"message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/217315","number":217315,"state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
rbrtj added a commit that referenced this pull request Apr 7, 2025
#217178) (#217315)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[ML] AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)](#217178)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-07T10:06:30Z","message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:ML/AIOps","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1","v8.17.5"],"title":"[ML]
AIOps: Change Point Detection in Dashboards embeddable
fix","number":217178,"url":"https://github.com/elastic/kibana/pull/217178","mergeCommit":{"message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18","9.0","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217178","number":217178,"mergeCommit":{"message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
rbrtj added a commit that referenced this pull request Apr 7, 2025
…#217178) (#217318)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)](#217178)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-07T10:06:30Z","message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:ML/AIOps","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1","v8.17.5"],"title":"[ML]
AIOps: Change Point Detection in Dashboards embeddable
fix","number":217178,"url":"https://github.com/elastic/kibana/pull/217178","mergeCommit":{"message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217178","number":217178,"mergeCommit":{"message":"[ML]
AIOps: Change Point Detection in Dashboards embeddable fix
(#217178)\n\nIt fixes an issue where adding the `Change Point Detection`
embeddable\ndidn't work properly.\nThe bug was introduced in
https://github.com/elastic/kibana/pull/197943\nThe main cause was the
use of `<ChangePointDetectionContextProvider>`\nwhich calls
`timefilter.getActiveBounds()`. However, for\n`getActiveBounds` to work,
`this.isTimeRangeSelectorEnabled()` must\nreturn true. By default, this
is not the case within dashboards.\nHowever, we do not actually need the
`ChangePointDetectionContext`\ninside the embeddable, so this PR removes
its usage.\nA functional test has been added to cover adding the Change
Point\nembeddable from the dashboards app. It's a very simple test that
does\nnot verify the embeddable's functionality, but it could be
improved in
a\nfollow-up.\n\n![image](https://github.com/user-attachments/assets/52b7f28b-87a0-423e-a923-d3e02300bf71)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d35988152d9e95e26908046ea3540d34e47cf92f"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/217316","number":217316,"state":"OPEN"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/217315","number":217315,"state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <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

backport:version Backport to applied version labels Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml release_note:fix v8.17.5 v8.18.0 v8.19.0 v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants