-
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
Add SO import hook / warnings API #87996
Add SO import hook / warnings API #87996
Conversation
Pinging @elastic/kibana-core (Team:Core) |
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 tested the functionality in the context of alerting's needs and LGTM 👍
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.
Changes in Spaces plugin tests LGTM and Copy to Space
API/UI can be updated in a follow-up.
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.
Very little to add here. Follows a similar structure to #87807 so it's quite easy to follow. Let's make sure to track Alerting's and SIEM's integration with this once these two PRs are merged.
/** The path (without the basePath) that the user should be redirect to to address this warning. */ | ||
actionUrl: string; |
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.
Should we name this actionPath
instead of URL to make this more clear that it should be an in-app path and cannot be an external URL?
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* initial commit * adapt client-side signatures * more type fixes * adapt api IT asserts * fix some unit tests * fix more test usages * fix integration tests * fix FT test assertions * fix FT test assertions * add FTR API integ test suite * create the plugin_api_integration test suite * adapt and fix flyout tests * update documentation * update generated doc * add unit tests for `executeImportHooks` * wire resolve_import_errors and add unit tests * move hooks registration to SO type API * update generated doc * design integration * update generated doc * Add FTR tests for import warnings * deletes plugins api integ tests * self review * move onImport to management definition * update license header * rename actionUrl to actionPath
Fix merge conflicts from elastic#87996.
* initial commit * adapt client-side signatures * more type fixes * adapt api IT asserts * fix some unit tests * fix more test usages * fix integration tests * fix FT test assertions * fix FT test assertions * add FTR API integ test suite * create the plugin_api_integration test suite * adapt and fix flyout tests * update documentation * update generated doc * add unit tests for `executeImportHooks` * wire resolve_import_errors and add unit tests * move hooks registration to SO type API * update generated doc * design integration * update generated doc * Add FTR tests for import warnings * deletes plugins api integ tests * self review * move onImport to management definition * update license header * rename actionUrl to actionPath
Summary
Fix #84977
This PR adds hook support to SO imports. Type owners can now register an import hook using the new
SavedObjectType.onImport
property when registering their type viaregisterType
.The import hooks currently only support a single feature: returning import warnings that will be displayed to the user when the import succeeds.
API usage example
Screenshots
How to test
I personally used this diff to add warnings to dashboards during testing
Checklist
Delete any items that are not applicable to this PR.