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

space: Cleanup saved objects mappings #153156

Merged

Conversation

TinaHeiligers
Copy link
Contributor

Summary

Related to #149102

Subset of the global cleanup attempt in #153070

Dry run for cleaning up space saved object mappings (imageUrl)

@TinaHeiligers TinaHeiligers added Feature:Security/Spaces Platform Security - Spaces feature release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Feature:Migrations v8.8.0 labels Mar 11, 2023
@TinaHeiligers
Copy link
Contributor Author

@elastic/kibana-security if CI goes green, we can use this PR to clean up the savedSearch mappings.
If not (which it won't since imageUrl is referenced as a SO attribute), could you please choose to keep or remove the field from the saved object mapping and handle refactoring to support it?

type: 'text',
index: false,
},
// imageUrl: {
Copy link
Contributor

Choose a reason for hiding this comment

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

without dynamic: false at the top-level of the mappings this will mean documents can't be created if they have an imageUrl

Copy link
Contributor Author

@TinaHeiligers TinaHeiligers Mar 15, 2023

Choose a reason for hiding this comment

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

how's this? 0275070 (#153156)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rudolf finally, a green build! Let's see if updating from main causes any issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've re-requested a review.

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

@elasticmachine merge upstream

Copy link
Member

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

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

LGTM with one nit, thanks!

x-pack/plugins/spaces/server/saved_objects/mappings.ts Outdated Show resolved Hide resolved
@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers TinaHeiligers enabled auto-merge (squash) March 21, 2023 13:55
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

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
space 9 8 -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

@TinaHeiligers TinaHeiligers merged commit 0e159da into elastic:main Mar 23, 2023
@rudolf rudolf added the Epic:ScaleMigrations Scale upgrade migrations to millions of saved objects label Sep 23, 2023
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 Epic:ScaleMigrations Scale upgrade migrations to millions of saved objects Feature:Migrations Feature:Security/Spaces Platform Security - Spaces feature 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.

5 participants