-
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
Fix "Export Everything" to properly constrain types #21402
Conversation
@@ -49,7 +49,7 @@ export function registerScrollForExportRoute(server) { | |||
const savedObjectsClient = req.getSavedObjectsClient(); | |||
const objects = await findAll(savedObjectsClient, { | |||
perPage: 1000, | |||
typesToInclude: req.payload.typesToInclude | |||
type: req.payload.typesToInclude |
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 is directly related to #19231 right?
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.
Yep, this is definitely related, although if I understand this correctly, this issue was present before that PR -- it looks like the original implementation before #19231 was passing includeTypes
through to the find
method, rather than typesToInclude
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!
💚 Build Succeeded |
@chrisronline should we be considering this as a 6.4 blocker? |
I opened an issue to track/describe the bug itself. I'm going to merge this PR to master and 6.x while we figure out what to do for 6.4 6.x: #21417 |
This fixes the "Export Everything" button on the Saved Objects Management screen so that the export properly constrains the saved object types returned. Previously, this endpoint was incorrectly returning objects that were not requested (such as the `config` object). This behavior is exacerbated with [Spaces](elastic#18948) because the export button would incorrectly export the Space objects, which in turn do not make sense to import.
@kobelb I'll let @bmcconaghy weigh in, but it doesn't feel like a blocker as the import should just skip those. |
@chrisronline it's a regression from 6.3 though, right? |
@kobelb Yes, most likely (should be verified) |
@chrisronline |
If it's a verified regression, and it's affecting a commonly used feature of our software, as far as I'm aware it meets all of the definitions of a blocker, so I'd recommend treating it as such. |
Fixes #21416 - this is identical to #21402, but adds testing to prevent a regression. @chrisronline in the interest of speed, time, and stability for 6.4, I opted not to do a full functional test, but rather an API test to ensure that the API endpoint was interacting with the Saved Objects Client as expected.
Fixes elastic#21416 - this is identical to elastic#21402, but adds testing to prevent a regression. @chrisronline in the interest of speed, time, and stability for 6.4, I opted not to do a full functional test, but rather an API test to ensure that the API endpoint was interacting with the Saved Objects Client as expected.
Fixes elastic#21416 - this is identical to elastic#21402, but adds testing to prevent a regression. @chrisronline in the interest of speed, time, and stability for 6.4, I opted not to do a full functional test, but rather an API test to ensure that the API endpoint was interacting with the Saved Objects Client as expected.
Fixes #21416 - this is identical to #21402, but adds testing to prevent a regression. @chrisronline in the interest of speed, time, and stability for 6.4, I opted not to do a full functional test, but rather an API test to ensure that the API endpoint was interacting with the Saved Objects Client as expected.
This fixes the "Export Everything" button on the Saved Objects Management screen so that the export properly constrains the saved object types returned.
Previously, this endpoint was incorrectly returning objects that were not requested (such as the
config
object). This behavior is exacerbated with Spaces because the export button would incorrectly export the Space objects, which in turn do not make sense to import.