-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 Searches] Soften saved search Content Management response sort
schema
#166886
[Saved Searches] Soften saved search Content Management response sort
schema
#166886
Conversation
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
💚 Build Succeeded
Metrics [docs]
To update your PR or re-run it, just comment with: cc @davismcphee |
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.
LGTM 👍
…t` schema (elastic#166886) ## Summary This PR softens the saved search CM response `sort` schema to align it with the saved search SO `sort` schema from elastic#156769 (no `minSize`). You can import this broken saved search SO for testing: ```json {"attributes":{"columns":["response","url","clientip","machine.os","tags"],"description":"","grid":{},"hideChart":false,"hits":0,"isTextBasedQuery":false,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[[]],"timeRestore":false,"title":"test","version":1},"coreMigrationVersion":"8.8.0","created_at":"2023-09-20T20:01:37.753Z","id":"2f360f30-ea74-11eb-b4c6-3d2afc1cb389","managed":false,"references":[{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","typeMigrationVersion":"7.9.3","updated_at":"2023-09-20T20:02:12.775Z","version":"WzQwLDFd"} {"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":1,"missingRefCount":0,"missingReferences":[]} ``` Fixes elastic#166880. ### 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) (cherry picked from commit d7369d9)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…se `sort` schema (#166886) (#166943) # Backport This will backport the following commits from `main` to `8.10`: - [[Saved Searches] Soften saved search Content Management response `sort` schema (#166886)](#166886) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Davis McPhee","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-21T13:46:54Z","message":"[Saved Searches] Soften saved search Content Management response `sort` schema (#166886)\n\n## Summary\r\n\r\nThis PR softens the saved search CM response `sort` schema to align it\r\nwith the saved search SO `sort` schema from #156769 (no `minSize`).\r\n\r\nYou can import this broken saved search SO for testing:\r\n```json\r\n{\"attributes\":{\"columns\":[\"response\",\"url\",\"clientip\",\"machine.os\",\"tags\"],\"description\":\"\",\"grid\":{},\"hideChart\":false,\"hits\":0,\"isTextBasedQuery\":false,\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\\"query\\\":{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"kuery\\\"},\\\"filter\\\":[],\\\"indexRefName\\\":\\\"kibanaSavedObjectMeta.searchSourceJSON.index\\\"}\"},\"sort\":[[]],\"timeRestore\":false,\"title\":\"test\",\"version\":1},\"coreMigrationVersion\":\"8.8.0\",\"created_at\":\"2023-09-20T20:01:37.753Z\",\"id\":\"2f360f30-ea74-11eb-b4c6-3d2afc1cb389\",\"managed\":false,\"references\":[{\"id\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"name\":\"kibanaSavedObjectMeta.searchSourceJSON.index\",\"type\":\"index-pattern\"}],\"type\":\"search\",\"typeMigrationVersion\":\"7.9.3\",\"updated_at\":\"2023-09-20T20:02:12.775Z\",\"version\":\"WzQwLDFd\"}\r\n{\"excludedObjects\":[],\"excludedObjectsCount\":0,\"exportedCount\":1,\"missingRefCount\":0,\"missingReferences\":[]}\r\n```\r\n\r\nFixes #166880.\r\n\r\n### Checklist\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d7369d9bdea56a8fbc4bcf8aefac4feceedf1a94","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","v8.11.0","v8.10.3"],"number":166886,"url":"https://github.com/elastic/kibana/pull/166886","mergeCommit":{"message":"[Saved Searches] Soften saved search Content Management response `sort` schema (#166886)\n\n## Summary\r\n\r\nThis PR softens the saved search CM response `sort` schema to align it\r\nwith the saved search SO `sort` schema from #156769 (no `minSize`).\r\n\r\nYou can import this broken saved search SO for testing:\r\n```json\r\n{\"attributes\":{\"columns\":[\"response\",\"url\",\"clientip\",\"machine.os\",\"tags\"],\"description\":\"\",\"grid\":{},\"hideChart\":false,\"hits\":0,\"isTextBasedQuery\":false,\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\\"query\\\":{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"kuery\\\"},\\\"filter\\\":[],\\\"indexRefName\\\":\\\"kibanaSavedObjectMeta.searchSourceJSON.index\\\"}\"},\"sort\":[[]],\"timeRestore\":false,\"title\":\"test\",\"version\":1},\"coreMigrationVersion\":\"8.8.0\",\"created_at\":\"2023-09-20T20:01:37.753Z\",\"id\":\"2f360f30-ea74-11eb-b4c6-3d2afc1cb389\",\"managed\":false,\"references\":[{\"id\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"name\":\"kibanaSavedObjectMeta.searchSourceJSON.index\",\"type\":\"index-pattern\"}],\"type\":\"search\",\"typeMigrationVersion\":\"7.9.3\",\"updated_at\":\"2023-09-20T20:02:12.775Z\",\"version\":\"WzQwLDFd\"}\r\n{\"excludedObjects\":[],\"excludedObjectsCount\":0,\"exportedCount\":1,\"missingRefCount\":0,\"missingReferences\":[]}\r\n```\r\n\r\nFixes #166880.\r\n\r\n### Checklist\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d7369d9bdea56a8fbc4bcf8aefac4feceedf1a94"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166886","number":166886,"mergeCommit":{"message":"[Saved Searches] Soften saved search Content Management response `sort` schema (#166886)\n\n## Summary\r\n\r\nThis PR softens the saved search CM response `sort` schema to align it\r\nwith the saved search SO `sort` schema from #156769 (no `minSize`).\r\n\r\nYou can import this broken saved search SO for testing:\r\n```json\r\n{\"attributes\":{\"columns\":[\"response\",\"url\",\"clientip\",\"machine.os\",\"tags\"],\"description\":\"\",\"grid\":{},\"hideChart\":false,\"hits\":0,\"isTextBasedQuery\":false,\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\\"query\\\":{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"kuery\\\"},\\\"filter\\\":[],\\\"indexRefName\\\":\\\"kibanaSavedObjectMeta.searchSourceJSON.index\\\"}\"},\"sort\":[[]],\"timeRestore\":false,\"title\":\"test\",\"version\":1},\"coreMigrationVersion\":\"8.8.0\",\"created_at\":\"2023-09-20T20:01:37.753Z\",\"id\":\"2f360f30-ea74-11eb-b4c6-3d2afc1cb389\",\"managed\":false,\"references\":[{\"id\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"name\":\"kibanaSavedObjectMeta.searchSourceJSON.index\",\"type\":\"index-pattern\"}],\"type\":\"search\",\"typeMigrationVersion\":\"7.9.3\",\"updated_at\":\"2023-09-20T20:02:12.775Z\",\"version\":\"WzQwLDFd\"}\r\n{\"excludedObjects\":[],\"excludedObjectsCount\":0,\"exportedCount\":1,\"missingRefCount\":0,\"missingReferences\":[]}\r\n```\r\n\r\nFixes #166880.\r\n\r\n### Checklist\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d7369d9bdea56a8fbc4bcf8aefac4feceedf1a94"}},{"branch":"8.10","label":"v8.10.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Davis McPhee <[email protected]>
## Summary Close #167152 Log a warning instead of throwing an error in `saved_object_content_storage` when response validation failed. We decided to do this as a precaution and as a follow up to an issue found in saved search #166886 where storage started failing because of too strict validation. As of this PR the saved_object_content_storage covers and this change cover: - `search` - `index_pattern` - `dashboard` - `lens` - `maps` For other types we agreed with @dej611 that instead of applying the same change for other types (visualization, graph, annotation) the team would look into migrating their types to also use `saved_object_content_storage` #167421
Summary
This PR softens the saved search CM response
sort
schema to align it with the saved search SOsort
schema from #156769 (nominSize
).You can import this broken saved search SO for testing:
Fixes #166880.
Checklist
For maintainers