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] Hide ES|QL based saved searches in ML & Transforms #195084

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

rbrtj
Copy link
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) 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
Contributor

Pinging @elastic/ml-ui (:ml)

@@ -69,6 +72,9 @@ export const Page: FC<PageProps> = ({
defaultMessage: 'Saved search',
}
),
showSavedObject: (savedObject: SavedObject) =>
// ES|QL Based saved searches are not supported across ML, filter them out
Copy link
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
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
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
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.

@@ -64,6 +67,9 @@ export const SearchSelection: FC<SearchSelectionProps> = ({
defaultMessage: 'Saved search',
}
),
showSavedObject: (savedObject: SavedObject) =>
Copy link
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
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
20 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https:/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:/user-attachments/assets/dff7e1d6-4c8e-4916-acec-c6b9931c2a39)
Then, after selecting the ESQL based search:

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

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

(cherry picked from commit 1b4ebaa)
@kibanamachine
Copy link
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 &amp; Transforms
(#195084)](#195084)

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

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

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"[email protected]"},"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:/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:/user-attachments/assets/dff7e1d6-4c8e-4916-acec-c6b9931c2a39)\r\nThen,
after selecting the ESQL based
search:\r\n\r\n![image](https:/user-attachments/assets/9314cd0b-442a-4287-9d29-799e172f929a)\r\nAfter
the
fix:\r\n\r\n![image](https:/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:/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:/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:/user-attachments/assets/dff7e1d6-4c8e-4916-acec-c6b9931c2a39)\r\nThen,
after selecting the ESQL based
search:\r\n\r\n![image](https:/user-attachments/assets/9314cd0b-442a-4287-9d29-799e172f929a)\r\nAfter
the
fix:\r\n\r\n![image](https:/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:/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:/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:/user-attachments/assets/dff7e1d6-4c8e-4916-acec-c6b9931c2a39)\r\nThen,
after selecting the ESQL based
search:\r\n\r\n![image](https:/user-attachments/assets/9314cd0b-442a-4287-9d29-799e172f929a)\r\nAfter
the
fix:\r\n\r\n![image](https:/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 <[email protected]>
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) v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants