-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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_search
: Cleanup saved objects mappings
#153129
saved_search
: Cleanup saved objects mappings
#153129
Conversation
@elastic/kibana-data-discovery if CI goes green, we can use this PR to clean up the |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does commenting out the index: false
mappings mean we lose the only server-side validation we have (since we're currently using the SO client directly) until we migrate to a typed API, and are we ok with this?
properties: { | ||
// may need code changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure what this means -- what code changes may we need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If your code references any of the fields that could potentially be removed from the mappings, you might need to refactor. So, for example, if you're using sort
from savedObjectsAttributes
directly, you'd need to refactor to use sort
from _source
.
yes, on losing server-side validation and "it's up to your team" on being ok with that. It doesn't really matter if we comment the mappings out or delete them, I wanted to raise awareness of the urgency of migrating to a typed API! Some teams have decided it's ok to keep fields when absolutely needed if they're ok with never being able to delete/remove them. @davismcphee, let me know if you're ok with removing these commented-out field mappings (or a subset of them) and I can see the work through. Alternatively, I'm also ok with closing this as not-doing and leaving it up to you folks to handle. |
@TinaHeiligers Thanks for the additional context and info!
Totally understandable, we're currently working with the Shared UX team on migrating our SOs to the Content Management system as services become available, so it hopefully shouldn't be this way for much longer.
I put an item on our agenda to discuss this in our team sync tomorrow and will follow up here with our decisions. Thanks again! |
@davismcphee what was the outcome? |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Saved Objects .kibana field count
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
@TinaHeiligers We think we may actually be able to remove more mappings than the ones currently commented out. I'll use this work as a base, but I can open a new PR to see how many of these we can get rid of. Thanks for getting this started for us! |
@davismcphee ok, I'll go ahead and close this PR then. |
Pull request was closed
## Summary This PR cleans up saved search mappings, removing all fields that aren't being searched or aggregated on. Continuation of the work started in #153129. ### Checklist - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [ ] ~[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~ - [ ] ~Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))~ - [ ] ~Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~ - [ ] ~This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))~ - [ ] ~This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)~ ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <[email protected]>
Summary
Related to #149102
Subset of the global cleanup attempt in #153070
Cleans up
saved_search
mappings