-
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
[Graph] Make Graph saved object share-capable #111404
Changes from 3 commits
6d46130
04d2f49
7b0a74d
d442f3e
3c87b53
471e0ef
11c905d
f475e06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,4 +88,5 @@ export const graphMigrations = { | |
doc.references = []; | ||
return doc; | ||
}, | ||
'8.0.0': (doc: SavedObjectUnsanitizedDoc<any>) => doc, // no-op, bump migration version to satisfy integration tests after adding convertToMultiNamespaceTypeVersion to graph_workspace SO | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This bit shouldn't be necessary, and I don't think it will fix the integration tests. Sorry I should have probably clarified, specifying There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried this locally and it did fix the test... I'll try to see what you mean by malformed data. Btw I based this PR on https://github.com/elastic/kibana/pull/110386/files, how come it is helpful there and not here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sorry, I got this PR for Graph confused with the other one for Lens #111403 (review)
That PR is for Alerting, which uses encrypted saved objects. They need a no-op migration function that will decrypt and re-encrypt the object (Step 5 of the Sharing Saved Objects dev guide). We had to do it that way because of the way encryption is handled in a plugin, not in Core. Anyway, you adding a no-op migration here doesn't hurt anything, but it shouldn't be needed to pass CI. If it is needed, that might be indicative of a Core bug that I need to fix. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's reproducible locally. Without my changes in migrations file the version for The actual version is equal 8.0.0 (correct) and the expectedVersion is wrong. That's because the expected one is read for all saved objects here: https://github.com/elastic/kibana/blob/master/src/core/server/saved_objects/migrationsv2/integration_tests/migration_from_v1.test.ts#L116 from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ohh, okay, thanks for clarifying. If you can wait a day or two, I'd be happy to add the Core changes and test them out locally. We can merge them in this PR if you're OK with that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, it can wait till 8.0.0! 😀 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, it appears to be after working hours for you so I took the liberty of just pushing the changes to this branch to get CI started, I hope you don't mind 🙂 |
||
}; |
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.
@jportner we don't need to adapt any call to use
resolve
instead ofget
for this specific SO type?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 done separately in this PR: #109617