-
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
Add logging to importer. Closes issue #192212 #192234
Conversation
💚 CLA has been signed |
Hello, I’ve now signed the contributor agreement, which covers the commit b523e16. |
Hello, I wanted to kindly request that someone with the necessary permissions add the release note label to this pull request. Unfortunately, I don't have the authority to apply labels, and it seems the label is required to pass the CI test. Thanks in advance for your assistance. |
@elasticmachine merge upstream |
ebc0ea8
to
39df481
Compare
@kyracho thank you for your PR! I added the required labels and updated your branch. Adding the logger to the Saved Objects Service won't automatically instrument logging, |
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.
Adding the logger to the Saved Objects Service won't automatically instrument logging.
The logger must be passed to the SavedObjectsImporter class and used in the import and resolveImportErrors APIs. The types, unit tests, and integration tests also need updates.
@elasticmachine merge upstream |
Pinging @elastic/fleet (Team:Fleet) |
b75eb81
to
61137bc
Compare
@kyracho the forced pushes don't start CI. Please request us to run CI on your behalf. |
@elasticmachine merge upstream |
There are no new commits on the base branch. |
@kyracho you're probably facing the rebase nightmare by now. It would be a good idea to update your fork of Kibana and keep that up to date with your local clone. Don't rebase anymore, merge updates instead. |
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.
import reads from a stream and awaiting the call (and other related function calls) can cause Kibana to OOM.
Logging doesn't warrant the risks of Kibana running out of memory.
}); | ||
this.#log.debug('Starting the import process'); | ||
try { | ||
const result = await importSavedObjectsFromStream({ |
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.
Awaiting a resolved promise from importSavedObjectsFromStream
is a problem when importing many saved objects and can cause Kibana to run out of memory.
import shouldn't await on importSavedObjectsFromStream
, we have to stick with calling the method directly.
I'd rather move the log line to before returning importSavedObjectsFromStream
and revert the other changes here,
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.
See node streams for more info
} | ||
|
||
public resolveImportErrors({ | ||
public async resolveImportErrors({ |
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.
we can't 'simply' change this....
}); | ||
this.#log.debug('Resolving import errors'); | ||
try { | ||
const result = await resolveSavedObjectsImportErrors({ |
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.
similar comment as for importSavedObjectsFromStream
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.
import reads from a stream and awaiting the call (and other related function calls) can cause Kibana to OOM.
Logging doesn't warrant the risks of Kibana running out of memory.
@TinaHeiligers Thanks for the guidance! I’ve made the following changes in response to your comments:
Let me know if anything else is needed! |
@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.
This PR adds simplistic logging.
We need to enhance the logs with information on the saved objects being imported, how they are imported and if there are any errors. The enhancements can be a follow up to this PR.
buildkite test this |
Thanks, Tina! I'd be happy to work on those enhancements in a new PR if that's okay. Please let me know if you'd like me to take it on. |
buildkite test this |
The idea is to use the logs for debugging, similar to how we log info during export. logging:
appenders:
so-console: // or use whatever you prefer
type: console
layout:
type: pattern
highlight: true
pattern: "SOS_IMPEXP--[%date][%level][%logger]---%message"
root:
appenders: [console]
level: info
loggers:
- name: savedobjects-service.exporter
level: all
appenders: [so-console] // feel free to change this
- name: savedobjects-service.importer
level: all
appenders: [so-console] // feel free to change this FYI: the appender is one I prefer to use, you can use whatever you want Start es |
Starting backport for target branches: 8.x |
💚 Build Succeeded
Metrics [docs]
|
## Summary Hello, this closes issue elastic#192212 by adding a custom logger to the importer, making debugging issues easier. ### Checklist Delete any items that are not applicable to this PR. - [N/A] 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) - [N/A] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [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 TODO - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed TODO - [N/A] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [N/A] 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)) - [N/A] 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) - [N/A] 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)) - [N/A] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### For maintainers - [X] 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) (no API changes) --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit c36a894)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [Add logging to importer. Closes issue #192212 (#192234)](#192234) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kyra Cho","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-08T01:58:32Z","message":"Add logging to importer. Closes issue #192212 (#192234)\n\n## Summary\r\nHello, this closes issue #192212 by adding a custom logger to the\r\nimporter, making debugging issues easier.\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [N/A] 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- [N/A]\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- [x] [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 TODO\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed TODO\r\n- [N/A] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [N/A] 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- [N/A] 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- [N/A] 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- [N/A] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### For maintainers\r\n\r\n- [X] 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)\r\n(no API changes)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"c36a8943982b92afd593a521d5a0bf2de06deb01","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","💝community","v9.0.0","backport:prev-minor","v8.16.0"],"title":"Add logging to importer. Closes issue #192212","number":192234,"url":"https://github.com/elastic/kibana/pull/192234","mergeCommit":{"message":"Add logging to importer. Closes issue #192212 (#192234)\n\n## Summary\r\nHello, this closes issue #192212 by adding a custom logger to the\r\nimporter, making debugging issues easier.\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [N/A] 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- [N/A]\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- [x] [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 TODO\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed TODO\r\n- [N/A] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [N/A] 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- [N/A] 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- [N/A] 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- [N/A] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### For maintainers\r\n\r\n- [X] 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)\r\n(no API changes)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"c36a8943982b92afd593a521d5a0bf2de06deb01"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192234","number":192234,"mergeCommit":{"message":"Add logging to importer. Closes issue #192212 (#192234)\n\n## Summary\r\nHello, this closes issue #192212 by adding a custom logger to the\r\nimporter, making debugging issues easier.\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [N/A] 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- [N/A]\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- [x] [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 TODO\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed TODO\r\n- [N/A] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [N/A] 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- [N/A] 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- [N/A] 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- [N/A] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### For maintainers\r\n\r\n- [X] 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)\r\n(no API changes)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"c36a8943982b92afd593a521d5a0bf2de06deb01"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Kyra Cho <[email protected]>
## Summary Hello, this is a follow up PR to #192234 . The previous PR added simplistic logging to the saved objects importer. The goal now is to enhance the logs with information on the saved objects being imported, how they are imported, and by displaying any errors. #### `import_saved_objects.ts`: - Logs specific types being imported - Logs size limit and overwrite status - Logs Success/Fail messages #### Changes to `saved_objects_importer.ts`: - Passes the logger to `importSavedObjectsFromStream` - Removes "starting import" #### Changes to `import_saved_objects.test.ts`: - Updates it for the new logger parameter #### Changes to `import.test.ts`: - Uses the mock logger provided by core, instead of using a custom one ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels) - [ ] This will appear in the **Release Notes** and follow the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Alejandro Fernández Haro <[email protected]>
## Summary Hello, this is a follow up PR to elastic#192234 . The previous PR added simplistic logging to the saved objects importer. The goal now is to enhance the logs with information on the saved objects being imported, how they are imported, and by displaying any errors. #### `import_saved_objects.ts`: - Logs specific types being imported - Logs size limit and overwrite status - Logs Success/Fail messages #### Changes to `saved_objects_importer.ts`: - Passes the logger to `importSavedObjectsFromStream` - Removes "starting import" #### Changes to `import_saved_objects.test.ts`: - Updates it for the new logger parameter #### Changes to `import.test.ts`: - Uses the mock logger provided by core, instead of using a custom one ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels) - [ ] This will appear in the **Release Notes** and follow the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Alejandro Fernández Haro <[email protected]> (cherry picked from commit 45543a1)
# Backport This will backport the following commits from `main` to `8.x`: - [basic enhancements for import logging (#196056)](#196056) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kyra Cho","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-01T00:50:21Z","message":"basic enhancements for import logging (#196056)\n\n## Summary\r\nHello, this is a follow up PR to #192234 . The previous PR added\r\nsimplistic logging to the saved objects importer. The goal now is to\r\nenhance the logs with information on the saved objects being imported,\r\nhow they are imported, and by displaying any errors.\r\n\r\n#### `import_saved_objects.ts`:\r\n- Logs specific types being imported\r\n- Logs size limit and overwrite status\r\n- Logs Success/Fail messages\r\n\r\n#### Changes to `saved_objects_importer.ts`:\r\n- Passes the logger to `importSavedObjectsFromStream` \r\n- Removes \"starting import\"\r\n\r\n#### Changes to `import_saved_objects.test.ts`:\r\n- Updates it for the new logger parameter\r\n\r\n#### Changes to `import.test.ts`:\r\n- Uses the mock logger provided by core, instead of using a custom one\r\n\r\n### Checklist\r\n\r\n- [x] [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- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\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#_add_your_labels)\r\n- [ ] This will appear in the **Release Notes** and follow the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Alejandro Fernández Haro <[email protected]>","sha":"45543a12a6ce7c32d0a14b45a24eccceca23d9d0","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Saved Objects","release_note:skip","💝community","v9.0.0","backport:prev-minor","v8.17.0"],"title":"basic enhancements for import logging","number":196056,"url":"https://github.com/elastic/kibana/pull/196056","mergeCommit":{"message":"basic enhancements for import logging (#196056)\n\n## Summary\r\nHello, this is a follow up PR to #192234 . The previous PR added\r\nsimplistic logging to the saved objects importer. The goal now is to\r\nenhance the logs with information on the saved objects being imported,\r\nhow they are imported, and by displaying any errors.\r\n\r\n#### `import_saved_objects.ts`:\r\n- Logs specific types being imported\r\n- Logs size limit and overwrite status\r\n- Logs Success/Fail messages\r\n\r\n#### Changes to `saved_objects_importer.ts`:\r\n- Passes the logger to `importSavedObjectsFromStream` \r\n- Removes \"starting import\"\r\n\r\n#### Changes to `import_saved_objects.test.ts`:\r\n- Updates it for the new logger parameter\r\n\r\n#### Changes to `import.test.ts`:\r\n- Uses the mock logger provided by core, instead of using a custom one\r\n\r\n### Checklist\r\n\r\n- [x] [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- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\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#_add_your_labels)\r\n- [ ] This will appear in the **Release Notes** and follow the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Alejandro Fernández Haro <[email protected]>","sha":"45543a12a6ce7c32d0a14b45a24eccceca23d9d0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196056","number":196056,"mergeCommit":{"message":"basic enhancements for import logging (#196056)\n\n## Summary\r\nHello, this is a follow up PR to #192234 . The previous PR added\r\nsimplistic logging to the saved objects importer. The goal now is to\r\nenhance the logs with information on the saved objects being imported,\r\nhow they are imported, and by displaying any errors.\r\n\r\n#### `import_saved_objects.ts`:\r\n- Logs specific types being imported\r\n- Logs size limit and overwrite status\r\n- Logs Success/Fail messages\r\n\r\n#### Changes to `saved_objects_importer.ts`:\r\n- Passes the logger to `importSavedObjectsFromStream` \r\n- Removes \"starting import\"\r\n\r\n#### Changes to `import_saved_objects.test.ts`:\r\n- Updates it for the new logger parameter\r\n\r\n#### Changes to `import.test.ts`:\r\n- Uses the mock logger provided by core, instead of using a custom one\r\n\r\n### Checklist\r\n\r\n- [x] [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- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\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#_add_your_labels)\r\n- [ ] This will appear in the **Release Notes** and follow the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Alejandro Fernández Haro <[email protected]>","sha":"45543a12a6ce7c32d0a14b45a24eccceca23d9d0"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Kyra Cho <[email protected]> Co-authored-by: Alejandro Fernández Haro <[email protected]>
## Summary Hello, this is a follow up PR to elastic#192234 . The previous PR added simplistic logging to the saved objects importer. The goal now is to enhance the logs with information on the saved objects being imported, how they are imported, and by displaying any errors. #### `import_saved_objects.ts`: - Logs specific types being imported - Logs size limit and overwrite status - Logs Success/Fail messages #### Changes to `saved_objects_importer.ts`: - Passes the logger to `importSavedObjectsFromStream` - Removes "starting import" #### Changes to `import_saved_objects.test.ts`: - Updates it for the new logger parameter #### Changes to `import.test.ts`: - Uses the mock logger provided by core, instead of using a custom one ### Checklist - [x] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels) - [ ] This will appear in the **Release Notes** and follow the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Alejandro Fernández Haro <[email protected]>
Summary
Hello, this closes issue #192212 by adding a custom logger to the importer, making debugging issues easier.
Checklist
Delete any items that are not applicable to this PR.
For maintainers