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

saved_query: Cleanup saved objects mappings #153131

Merged

Conversation

TinaHeiligers
Copy link
Contributor

@TinaHeiligers TinaHeiligers commented Mar 10, 2023

Summary

Related to #149102

Subset of the global cleanup attempt in #153070

Cleans up saved_query mappings

@TinaHeiligers TinaHeiligers added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting v8.8.0 labels Mar 10, 2023
@TinaHeiligers
Copy link
Contributor Author

@elastic/kibana-data-discovery @elastic/kibana-visualizations if CI goes green, we can use this PR to clean up the savedSearch mappings.
If not, it means there's a direct reference to the fields and you'll need to decide how to handle that.

@rudolf
Copy link
Contributor

rudolf commented Mar 15, 2023

@elasticmachine merge upstream

@TinaHeiligers TinaHeiligers marked this pull request as ready for review March 15, 2023 22:02
@TinaHeiligers TinaHeiligers requested review from a team as code owners March 15, 2023 22:02
Copy link
Contributor Author

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

cleanup self reviw

src/plugins/data/server/saved_objects/query.ts Outdated Show resolved Hide resolved
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations installed integrations: Amazon CloudFront, AWS CloudTrail, System, enabled integrations: Amazon CloudFront, Aws Cloudfront, System "before all" hook for "should display a badge with the installed integrations on the rule management page"

Metrics [docs]

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/saved-objects-service.html#_mappings

id before after diff
query 6 5 -1
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 433 436 +3

Total ESLint disabled count

id before after diff
securitySolution 513 516 +3

History

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

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Changes LGTM, did a quick test locally too just in case and everything seems fine 👍

if CI goes green, we can use this PR to clean up the savedSearch mappings.

I'm not sure if I'm just misunderstanding this point, but these changes will affect the "saved query" mappings (queries saved from the Unified Search bar), not the "saved search" mappings (Discover searches), which are located in src/plugins/saved_search/server/saved_objects/search.ts.

@rudolf
Copy link
Contributor

rudolf commented Mar 20, 2023

I'm not sure if I'm just misunderstanding this point, but these changes will affect the "saved query" mappings

Thanks raising this to clarify. I think there was some confusion about what saved_query saved objects are used for but the important thing is that we clean up these mappings. 👍

@davismcphee
Copy link
Contributor

Thanks raising this to clarify. I think there was some confusion about what saved_query saved objects are used for but the important thing is that we clean up these mappings. 👍

NP and definitely, they all need to be cleaned up regardless. We've discussed renaming these at some point anyway -- if it's confusing for our own team, I can only imagine it's even more confusing for our users 😅

@TinaHeiligers TinaHeiligers merged commit 7edb58f into elastic:main Mar 21, 2023
@TinaHeiligers TinaHeiligers deleted the saved-query-cleanup-index-false branch March 21, 2023 13:43
jughosta added a commit that referenced this pull request Apr 6, 2023
## Summary

A follow up for #153131
This PR adds schemas for kql-telemetry and search-telemetry SO types.
jughosta added a commit that referenced this pull request Apr 18, 2023
## Summary

A follow up for #153131
This PR adds schema for Saved Query SO type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants