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] AIOps: Fixes Change point embeddable reporting #169962

Merged
merged 13 commits into from
Oct 27, 2023

Conversation

darnautov
Copy link
Contributor

@darnautov darnautov commented Oct 26, 2023

Summary

Fixes #169733

Reporting fix

Change point detection embeddable was incorrectly reporting render completion. It was relying on the onLoad callback from the Lens embeddable responsible for chart rendering, which only indicates that data fetching is complete, but not the actual rendering. Current implementation relies on the renderComplete event from each child embeddable. Both PNG and PDF exports tested and work as expected.

DASHBOARDDDD

Additional fixes

  • Fixes the metric and split field controls states when editing existing Change point embeddable from a dashboard
  • Fixes filter query if partitions input is initialized as an empty array.

Checklist

@darnautov darnautov requested a review from a team as a code owner October 26, 2023 16:39
@darnautov darnautov added release_note:fix (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead labels Oct 26, 2023
@darnautov darnautov added the :ml label Oct 26, 2023
@darnautov darnautov self-assigned this Oct 26, 2023
@darnautov darnautov added the Team:ML Team label for ML (also use :ml) label Oct 26, 2023
@darnautov darnautov added Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis Feature:Embeddables Relating to the Embeddable system v8.11.0 v8.12.0 labels Oct 26, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@@ -205,7 +205,7 @@ export const FormControls: FC<{
return;
}

if (metricFieldOptions === prevMetricFieldOptions) return;
if (!prevMetricFieldOptions || metricFieldOptions === prevMetricFieldOptions) return;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line fixes the embeddable input editing from the Dashboard

@darnautov
Copy link
Contributor Author

@elasticmachine merge upstream

@darnautov
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
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.

Tested latest changes and LGTM

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
aiops 588.3KB 589.2KB +970.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @darnautov

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

@darnautov darnautov merged commit 80d382a into elastic:main Oct 27, 2023
26 checks passed
@darnautov darnautov deleted the ml-169733-fix-reporting branch October 27, 2023 15:13
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.11 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 169962

Questions ?

Please refer to the Backport tool documentation

@darnautov
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.11

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

Questions ?

Please refer to the Backport tool documentation

darnautov added a commit to darnautov/kibana that referenced this pull request Oct 27, 2023
## Summary

Fixes elastic#169733

#### Reporting fix

Change point detection embeddable was incorrectly reporting render
completion. It was relying on the `onLoad` callback from the Lens
embeddable responsible for chart rendering, which only indicates that
data fetching is complete, but not the actual rendering. Current
implementation relies on the `renderComplete` event from each child
embeddable. Both PNG and PDF exports tested and work as expected.

![DASHBOARDDDD](https://github.com/elastic/kibana/assets/5236598/fb718f31-5862-43ab-82e3-60ebb795b8eb)

#### Additional fixes

- Fixes the metric and split field controls states when editing existing
Change point embeddable from a dashboard
- Fixes `filter` query if partitions input is initialized as an empty
array.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 80d382a)

# Conflicts:
#	.eslintrc.js
darnautov added a commit that referenced this pull request Oct 30, 2023
…170046)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] AIOps: Fix Change point embeddable reporting
(#169962)](#169962)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-27T15:13:52Z","message":"[ML]
AIOps: Fix Change point embeddable reporting (#169962)\n\n##
Summary\r\n\r\nFixes #169733\r\n\r\n#### Reporting fix\r\n\r\nChange
point detection embeddable was incorrectly reporting
render\r\ncompletion. It was relying on the `onLoad` callback from the
Lens\r\nembeddable responsible for chart rendering, which only indicates
that\r\ndata fetching is complete, but not the actual rendering.
Current\r\nimplementation relies on the `renderComplete` event from each
child\r\nembeddable. Both PNG and PDF exports tested and work as
expected.\r\n\r\n\r\n![DASHBOARDDDD](https://github.com/elastic/kibana/assets/5236598/fb718f31-5862-43ab-82e3-60ebb795b8eb)\r\n\r\n####
Additional fixes\r\n\r\n- Fixes the metric and split field controls
states when editing existing\r\nChange point embeddable from a
dashboard\r\n- Fixes `filter` query if partitions input is initialized
as an empty\r\narray.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"80d382a22f2adc39a63146d3ffb5cb7763090c2e","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Reporting",":ml","Team:ML","Feature:ML/AIOps","Feature:Embeddables","v8.11.0","v8.12.0"],"number":169962,"url":"https://github.com/elastic/kibana/pull/169962","mergeCommit":{"message":"[ML]
AIOps: Fix Change point embeddable reporting (#169962)\n\n##
Summary\r\n\r\nFixes #169733\r\n\r\n#### Reporting fix\r\n\r\nChange
point detection embeddable was incorrectly reporting
render\r\ncompletion. It was relying on the `onLoad` callback from the
Lens\r\nembeddable responsible for chart rendering, which only indicates
that\r\ndata fetching is complete, but not the actual rendering.
Current\r\nimplementation relies on the `renderComplete` event from each
child\r\nembeddable. Both PNG and PDF exports tested and work as
expected.\r\n\r\n\r\n![DASHBOARDDDD](https://github.com/elastic/kibana/assets/5236598/fb718f31-5862-43ab-82e3-60ebb795b8eb)\r\n\r\n####
Additional fixes\r\n\r\n- Fixes the metric and split field controls
states when editing existing\r\nChange point embeddable from a
dashboard\r\n- Fixes `filter` query if partitions input is initialized
as an empty\r\narray.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"80d382a22f2adc39a63146d3ffb5cb7763090c2e"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/169962","number":169962,"mergeCommit":{"message":"[ML]
AIOps: Fix Change point embeddable reporting (#169962)\n\n##
Summary\r\n\r\nFixes #169733\r\n\r\n#### Reporting fix\r\n\r\nChange
point detection embeddable was incorrectly reporting
render\r\ncompletion. It was relying on the `onLoad` callback from the
Lens\r\nembeddable responsible for chart rendering, which only indicates
that\r\ndata fetching is complete, but not the actual rendering.
Current\r\nimplementation relies on the `renderComplete` event from each
child\r\nembeddable. Both PNG and PDF exports tested and work as
expected.\r\n\r\n\r\n![DASHBOARDDDD](https://github.com/elastic/kibana/assets/5236598/fb718f31-5862-43ab-82e3-60ebb795b8eb)\r\n\r\n####
Additional fixes\r\n\r\n- Fixes the metric and split field controls
states when editing existing\r\nChange point embeddable from a
dashboard\r\n- Fixes `filter` query if partitions input is initialized
as an empty\r\narray.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"80d382a22f2adc39a63146d3ffb5cb7763090c2e"}}]}]
BACKPORT-->
fkanout pushed a commit to fkanout/kibana that referenced this pull request Oct 30, 2023
## Summary

Fixes elastic#169733

#### Reporting fix

Change point detection embeddable was incorrectly reporting render
completion. It was relying on the `onLoad` callback from the Lens
embeddable responsible for chart rendering, which only indicates that
data fetching is complete, but not the actual rendering. Current
implementation relies on the `renderComplete` event from each child
embeddable. Both PNG and PDF exports tested and work as expected.


![DASHBOARDDDD](https://github.com/elastic/kibana/assets/5236598/fb718f31-5862-43ab-82e3-60ebb795b8eb)

#### Additional fixes

- Fixes the metric and split field controls states when editing existing
Change point embeddable from a dashboard
- Fixes `filter` query if partitions input is initialized as an empty
array.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
bryce-b pushed a commit to bryce-b/kibana that referenced this pull request Oct 30, 2023
## Summary

Fixes elastic#169733

#### Reporting fix

Change point detection embeddable was incorrectly reporting render
completion. It was relying on the `onLoad` callback from the Lens
embeddable responsible for chart rendering, which only indicates that
data fetching is complete, but not the actual rendering. Current
implementation relies on the `renderComplete` event from each child
embeddable. Both PNG and PDF exports tested and work as expected.


![DASHBOARDDDD](https://github.com/elastic/kibana/assets/5236598/fb718f31-5862-43ab-82e3-60ebb795b8eb)

#### Additional fixes

- Fixes the metric and split field controls states when editing existing
Change point embeddable from a dashboard
- Fixes `filter` query if partitions input is initialized as an empty
array.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
awahab07 pushed a commit to awahab07/kibana that referenced this pull request Oct 31, 2023
## Summary

Fixes elastic#169733

#### Reporting fix

Change point detection embeddable was incorrectly reporting render
completion. It was relying on the `onLoad` callback from the Lens
embeddable responsible for chart rendering, which only indicates that
data fetching is complete, but not the actual rendering. Current
implementation relies on the `renderComplete` event from each child
embeddable. Both PNG and PDF exports tested and work as expected.


![DASHBOARDDDD](https://github.com/elastic/kibana/assets/5236598/fb718f31-5862-43ab-82e3-60ebb795b8eb)

#### Additional fixes

- Fixes the metric and split field controls states when editing existing
Change point embeddable from a dashboard
- Fixes `filter` query if partitions input is initialized as an empty
array.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
@szabosteve szabosteve changed the title [ML] AIOps: Fix Change point embeddable reporting [ML] AIOps: Fixes Change point embeddable reporting Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Feature:Embeddables Relating to the Embeddable system Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml release_note:fix Team:ML Team label for ML (also use :ml) v8.11.0 v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change point detection panel breaks reporting with screenshot timed out error
7 participants