Skip to content

[ML] Hide ES|QL based saved searches in ML & Transforms#195084

Merged
rbrtj merged 2 commits intoelastic:mainfrom
rbrtj:hide-esql-based-saved-searches-in-ml
Oct 9, 2024
Merged

[ML] Hide ES|QL based saved searches in ML & Transforms#195084
rbrtj merged 2 commits intoelastic:mainfrom
rbrtj:hide-esql-based-saved-searches-in-ml

Conversation

@rbrtj
Copy link
Copy Markdown
Contributor

@rbrtj rbrtj commented Oct 4, 2024

Summary

Fix for: #187962
We were displaying ES|QL based searches in various areas of ML, not just in the places mentioned in the issue.
Before:
Screenshot 2024-10-04 at 16 16 26
Then, after selecting the ESQL based search:
image
After the fix:
image

@rbrtj rbrtj added release_note:fix :ml v9.0.0 Team:ML Team label for ML (also use :ml) t// v8.16.0 backport:version Backport to applied version labels labels Oct 4, 2024
@rbrtj rbrtj self-assigned this Oct 4, 2024
@rbrtj rbrtj requested a review from a team as a code owner October 4, 2024 14:21
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

}
),
showSavedObject: (savedObject: SavedObject) =>
// ES|QL Based saved searches are not supported across ML, filter them out
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It covers:

  • Data Visualizer => Data View
  • AIOps Labs
  • Anomaly Detection => Jobs

@kibana-ci
Copy link
Copy Markdown

💚 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
ml 4.6MB 4.6MB +162.0B
transform 585.3KB 585.3KB +54.0B
total +216.0B

History

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

cc @rbrtj

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.

Tested and LGTM.

defaultMessage: 'Saved search',
}
),
showSavedObject: (savedObject: SavedObject) =>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Interestingly the transform wizard used to partially work when selecting an ES|QL based saved search, successfully pulling out the index pattern from the search to use in the transform. However the other commands in the search (WHERE, RENAME, DROP etc) would be ignored, so I think this change is correct, filtering out ES|QL based saved searches until if / when the transform wizard supports the whole of the search.

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

LGTM

@rbrtj rbrtj merged commit 1b4ebaa into elastic:main Oct 9, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 9, 2024
## Summary

Fix for: [elastic#187962](elastic#187962)
We were displaying ES|QL based searches in various areas of ML, not just
in the places mentioned in the issue.
Before:
![Screenshot 2024-10-04 at 16 16
26](https://github.com/user-attachments/assets/dff7e1d6-4c8e-4916-acec-c6b9931c2a39)
Then, after selecting the ESQL based search:

![image](https://github.com/user-attachments/assets/9314cd0b-442a-4287-9d29-799e172f929a)
After the fix:

![image](https://github.com/user-attachments/assets/e660ef24-c585-4d95-bcf1-2578ec9e663d)

(cherry picked from commit 1b4ebaa)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 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

kibanamachine added a commit that referenced this pull request Oct 9, 2024
…95084) (#195541)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Hide ES|QL based saved searches in ML & Transforms
(#195084)](#195084)

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

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

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-09T08:14:50Z","message":"[ML]
Hide ES|QL based saved searches in ML & Transforms (#195084)\n\n##
Summary\r\n\r\nFix for:
[#187962](https://github.com/elastic/kibana/issues/187962)\r\nWe were
displaying ES|QL based searches in various areas of ML, not just\r\nin
the places mentioned in the issue.\r\nBefore:\r\n![Screenshot 2024-10-04
at 16
16\r\n26](https://github.com/user-attachments/assets/dff7e1d6-4c8e-4916-acec-c6b9931c2a39)\r\nThen,
after selecting the ESQL based
search:\r\n\r\n![image](https://github.com/user-attachments/assets/9314cd0b-442a-4287-9d29-799e172f929a)\r\nAfter
the
fix:\r\n\r\n![image](https://github.com/user-attachments/assets/e660ef24-c585-4d95-bcf1-2578ec9e663d)","sha":"1b4ebaa85261074aec775d23165474863ddea45a","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","v9.0.0","Team:ML","v8.16.0","backport:version"],"title":"[ML]
Hide ES|QL based saved searches in ML &
Transforms","number":195084,"url":"https://github.com/elastic/kibana/pull/195084","mergeCommit":{"message":"[ML]
Hide ES|QL based saved searches in ML & Transforms (#195084)\n\n##
Summary\r\n\r\nFix for:
[#187962](https://github.com/elastic/kibana/issues/187962)\r\nWe were
displaying ES|QL based searches in various areas of ML, not just\r\nin
the places mentioned in the issue.\r\nBefore:\r\n![Screenshot 2024-10-04
at 16
16\r\n26](https://github.com/user-attachments/assets/dff7e1d6-4c8e-4916-acec-c6b9931c2a39)\r\nThen,
after selecting the ESQL based
search:\r\n\r\n![image](https://github.com/user-attachments/assets/9314cd0b-442a-4287-9d29-799e172f929a)\r\nAfter
the
fix:\r\n\r\n![image](https://github.com/user-attachments/assets/e660ef24-c585-4d95-bcf1-2578ec9e663d)","sha":"1b4ebaa85261074aec775d23165474863ddea45a"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195084","number":195084,"mergeCommit":{"message":"[ML]
Hide ES|QL based saved searches in ML & Transforms (#195084)\n\n##
Summary\r\n\r\nFix for:
[#187962](https://github.com/elastic/kibana/issues/187962)\r\nWe were
displaying ES|QL based searches in various areas of ML, not just\r\nin
the places mentioned in the issue.\r\nBefore:\r\n![Screenshot 2024-10-04
at 16
16\r\n26](https://github.com/user-attachments/assets/dff7e1d6-4c8e-4916-acec-c6b9931c2a39)\r\nThen,
after selecting the ESQL based
search:\r\n\r\n![image](https://github.com/user-attachments/assets/9314cd0b-442a-4287-9d29-799e172f929a)\r\nAfter
the
fix:\r\n\r\n![image](https://github.com/user-attachments/assets/e660ef24-c585-4d95-bcf1-2578ec9e663d)","sha":"1b4ebaa85261074aec775d23165474863ddea45a"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@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 :ml release_note:fix Team:ML Team label for ML (also use :ml) t// v8.16.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants