-
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
Removes support for legacy exports #110738
Removes support for legacy exports #110738
Conversation
@elasticmachine merge upstream |
@@ -16,11 +16,6 @@ jest.doMock('../../../lib/resolve_import_errors', () => ({ | |||
resolveImportErrors: resolveImportErrorsMock, | |||
})); | |||
|
|||
export const importLegacyFileMock = jest.fn(); |
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 only removed the mock for the method we're removing here.
this.setState({ status: 'loading', error: undefined }); | ||
|
||
// Log warning on server, don't wait for response | ||
logLegacyImport(http); |
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.
The method and route will be removed in a follow up that handles the second bullet point of #103921
@@ -635,7 +440,8 @@ export class Flyout extends Component<FlyoutProps, FlyoutState> { | |||
); | |||
} | |||
|
|||
if (!isLegacyFile && status === 'success') { | |||
// Import summary for completed import |
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.
Not sure if the code comment is needed here so I added one anyway. We only had a comment for handling legacy imports and that's gone now.
@elastic/kibana-presentation I've had to address some failing functional tests that were either directly testing methods to handle legacy saved object imports or had legacy objects being imported for a test. Here's an issue for that: #111004 |
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.
A few comments, but looking fine.
Do you think the second bullet point of #103921 requires a distinct PR (the third definitely does though) ? It may be easier to review those two parts as the same time (but that's just an opinion, splitting is fine too)
"panelsJSON": "[{\"gridData\":{\"h\":3,\"i\":\"1\",\"w\":6,\"x\":0,\"y\":0},\"id\":\"3fe22200-3dcb-11e8-8660-4d65aa086b3c\",\"panelIndex\":\"1\",\"type\":\"visualization\",\"version\":\"6.2.4\"}]", | ||
"optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", |
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.
Is that fine to remove those files/tests , or should we just skip the tests and open an issue for the presentation team to adapt them?
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.
Um, good idea! Done in c0299e6
(#110738)
I've also created the follow up issue for the presentation team and let them know: #111004
await esArchiver.load('test/functional/fixtures/es_archiver/saved_objects_imports'); | ||
await kibanaServer.uiSettings.replace({}); | ||
await PageObjects.settings.navigateTo(); | ||
await PageObjects.settings.clickKibanaSavedObjects(); | ||
}); |
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.
You can remove all the .json
export files that should no longer be used in test/functional/apps/management/exports
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.
Attempt 1: 912c588
(#110738)
await this.testSubjects.existOrFail('importSavedObjectsSuccess', { timeout: 20000 }); | ||
await this.testSubjects.existOrFail('importSavedObjectsSuccess', { timeout: 20000 }); |
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.
Was this added by mistake?
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.
Oops, yes, I've removed the duplicate in 317a448
(#110738) 😊
if (isLegacyFile) { | ||
return overwriteRadio; | ||
} |
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.
NIT: Now that this condition is removed, we no longer need to use this overwriteRadio
variable, and we can directly inline it's value inside the returned value
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.
Done in 317a448
(#110738)
@pgayvallet I started looking into removing the files and it's a lot more work that one might think. I think it'll be easier to follow the split pattern and unblock other teams from moving forward with their work. I've started to work on a draft and will follow up in new PR with the remaining parts as soon as priorities allow. |
…on team to address
@elasticmachine merge upstream |
…/remove_legacy_import_support
ab16382
to
7fac104
Compare
Who would have expected that coming from an SO feature 😅 . Follow-up it is, then |
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
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.
🎉
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.
Presentation changes lgtm
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Removes support for legacy imports from the top most UI layer of saved objects management.
Handles Phase 1 of #103921
The documentation about importing saved objects only talks about importing
.ndjson
files, so we don't need to do anything there.Checklist
Risk Matrix
For maintainers
Release note:
In Kibana 8.0, we will no longer support the legacy export format from Kibana 6.x. Importing saved objects using the UI is restricted to
.ndjson
format imports.