-
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 object export: apply export hooks to referenced / nested objects #100769
Saved object export: apply export hooks to referenced / nested objects #100769
Conversation
…ive-export-transform
// sort with the provided sort function then with the default export sorting | ||
const exportedObjects = sortObjects(collectedObjects.sort(sortFunction)); |
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.
This behavior is unchanged, the double sorting was just performed in two different steps
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.
Code LGTM. i think its worth adding a plugin functional test to ensure this behaves as expected
src/core/server/saved_objects/export/collect_exported_objects.ts
Outdated
Show resolved
Hide resolved
src/core/server/saved_objects/export/collect_exported_objects.ts
Outdated
Show resolved
Hide resolved
…ive-export-transform
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
elastic#100769) * execute export transform for nested references * fix sort * fix duplicate references * add FTR test
Summary
Fix #100043
onExport
type hooks were only invoked for root level objects during the export process. Objects included by reference were not invoking the export hooks, causing inconsistency on the exports when objects were only included implicitly by reference.This PR fixes this, by invoking a type's
onExport
hook for objects included by reference inside the export.Note: objects added to the export via an export hook are still not re-invoking their type's
onExport
. This is outside of the scope of this PRChecklist