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 query string for the change point detection metric charts #181314

Merged

Conversation

darnautov
Copy link
Contributor

@darnautov darnautov commented Apr 22, 2024

Summary

Fixes #179814

Query string from the Unified Search query bar was applying to the change point agg request, but wasn't in sync with the query service to correctly render the chart preview. With the PR the query string is synchronized and metric charts are rendered correctly.

Checklist

@darnautov darnautov added release_note:fix :ml Team:ML Team label for ML (also use :ml) Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis v8.14.0 v8.15.0 labels Apr 22, 2024
@darnautov darnautov self-assigned this Apr 22, 2024
@darnautov darnautov requested a review from a team as a code owner April 22, 2024 13:48
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

Code & Test LGTM. 👍

@@ -241,11 +241,14 @@ export const ChangePointDetectionContextProvider: FC = ({ children }) => {
if (requestParamsFromUrl.filters) {
filterManager.setFilters(requestParamsFromUrl.filters);
}
if (requestParamsFromUrl.query) {
Copy link
Contributor

@peteharverson peteharverson Apr 23, 2024

Choose a reason for hiding this comment

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

Is this query getting cleared correctly when the data view is changed. Here I used farequote with a query of responsetime > 150, ran the analysis. Then I changed the data view to cloudwatch (split by instance):

Screenshot 2024-04-23 at 09 33 34

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed by 81c35d8

@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 412.6KB 412.8KB +208.0B

History

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

cc @darnautov

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

@darnautov darnautov merged commit 2bd49f5 into elastic:main Apr 24, 2024
16 checks passed
@darnautov darnautov deleted the ml-179814-fix-change-point-ui-filters branch April 24, 2024 11:55
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 24, 2024
## Summary

Fixes elastic#179814

Query string from the Unified Search query bar was applying to the
change point agg request, but wasn't in sync with the query service to
correctly render the chart preview. With the PR the query string is
synchronized and metric charts are rendered correctly.

### Checklist

- [ ] [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 2bd49f5)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.14

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

Questions ?

Please refer to the Backport tool documentation

@peteharverson peteharverson changed the title [ML] AIOps: Fix query string for the metric chart [ML] AIOps: Fixes query string for the change point detection metric charts Apr 24, 2024
kibanamachine added a commit that referenced this pull request Apr 24, 2024
…181549)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[ML] AIOps: Fix query string for the metric chart
(#181314)](#181314)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-04-24T11:55:03Z","message":"[ML]
AIOps: Fix query string for the metric chart (#181314)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/179814\r\n\r\nQuery string from
the Unified Search query bar was applying to the\r\nchange point agg
request, but wasn't in sync with the query service to\r\ncorrectly
render the chart preview. With the PR the query string
is\r\nsynchronized and metric charts are rendered
correctly.\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [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":"2bd49f5ae4816c75a87a371e58ca2b7ea73d4bd4","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Team:ML","Feature:ML/AIOps","v8.14.0","v8.15.0"],"title":"[ML]
AIOps: Fix query string for the metric chart
","number":181314,"url":"https://github.com/elastic/kibana/pull/181314","mergeCommit":{"message":"[ML]
AIOps: Fix query string for the metric chart (#181314)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/179814\r\n\r\nQuery string from
the Unified Search query bar was applying to the\r\nchange point agg
request, but wasn't in sync with the query service to\r\ncorrectly
render the chart preview. With the PR the query string
is\r\nsynchronized and metric charts are rendered
correctly.\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [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":"2bd49f5ae4816c75a87a371e58ca2b7ea73d4bd4"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/181314","number":181314,"mergeCommit":{"message":"[ML]
AIOps: Fix query string for the metric chart (#181314)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/179814\r\n\r\nQuery string from
the Unified Search query bar was applying to the\r\nchange point agg
request, but wasn't in sync with the query service to\r\ncorrectly
render the chart preview. With the PR the query string
is\r\nsynchronized and metric charts are rendered
correctly.\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [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":"2bd49f5ae4816c75a87a371e58ca2b7ea73d4bd4"}}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <[email protected]>
kpatticha pushed a commit to kpatticha/kibana that referenced this pull request Apr 26, 2024
## Summary

Fixes elastic#179814

Query string from the Unified Search query bar was applying to the
change point agg request, but wasn't in sync with the query service to
correctly render the chart preview. With the PR the query string is
synchronized and metric charts are rendered correctly.


### Checklist

- [ ] [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.14.0 v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] AIOps: Metric charts don't apply filters in the ML UI
6 participants