[DO NOT MERGE]: Test branch for Data Migration crew#25253
Closed
markfields wants to merge 25 commits intomainfrom
Closed
[DO NOT MERGE]: Test branch for Data Migration crew#25253markfields wants to merge 25 commits intomainfrom
markfields wants to merge 25 commits intomainfrom
Conversation
This PR is a combination of multiple different prototypes
…upports multiple internal Fluid Data Models (#25382) Main idea - the MigrationDataObject separates the external data interface (i.e. getting/setting arbitrary keys, maybe a SharedTree instance) from the internal fluid data model used to implement it (i.e. which DDSes are actually there in the Runtime). To do this it takes in a `TUniversalView` type parameter (the external data interface), and a list of one or more "Model Descriptors" which can identify whether the DataStoreRuntime matches that model (similar to `refreshRoot` in the base branch), as well as how to initialize a new DataObject with that model. Each Model Descriptor yields a model that fits into `TUniversalView`. The simplest way to specify `TUniversalView` is to just union all the individual model types. (The example below makes a different choice) ### Updating DataObject and TreeDataObject This PR also illustrates updating DataObject and TreeDataObject to use MigrationDataObject. We could deprecate those if we get MigrationDataObject to a place we like, and existing subclasses of DataObject could switch to MigrationDataObject directly. Then they'd be ready if/when a migration is needed. Maybe we simply put the new capabilities on PureDataObject instead of introducing a new class. ### Example See `demo.ts`. The Model Descriptor for the classic "root SharedDirectory" DataObject checks for a channel with ID "root" that's a SharedDirectory, whereas the Descriptor for the "root SharedTree" DataObject checks for "root-tree" channel that's a SharedTree. The `TUniversalView` here is this abstraction, taken from the prototype component code: ```typescript readonly getArbitraryKey: (key: string) => string | boolean | undefined; readonly setArbitraryKey: (key: string, value: string | boolean) => void; readonly deleteArbitraryKey: (key: string) => void; readonly getRoot: () => { isDirectory: true, root: ISharedDirectory } | { isDirectory: false, root: ITree, }; ``` ## Reviewer Guidance There are plenty of todos and some gaps. Some listed below. Any and all feedback is welcome, but focusing on higher-level is more helpful in the short term. ### Gaps / open questions - We need something like an "evacuateModel" function on ModelDescriptor to clean up unreferenced channels after migration - API / experience around how you'd roll out a new ModelDescriptor and stage the migration is not fleshed out. - Reminder this is targeting a WIP feature branch, so the rest of the migration flow is PoC quality as well Thanks for taking a look!
Fix build issues with MigrationDataObject prototype, by switching an API from alpha to beta, and switching to a type export.
Add missing API file.
Too much monkeying around wtih constructors!
…Object (#25545) ## Description We're moving nearly all the migration logic into the `MigrationDataObject` itself, to avoid having the Factory need to know information from Instance(s) (see old `observeCreateDataObject`). Additionally, try out a compositional approach to adding in the Migration bits needed by the factory rather than extending PureDataObjectFactory.
Contributor
|
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output |
Contributor
|
This PR has been automatically marked as stale because it has had no activity for 60 days. It will be closed if no further activity occurs within 8 days of this comment. Thank you for your contributions to Fluid Framework! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Staging / Discussion area for FF changes required for data migration. Focusing on migrating DataObject to use/support SharedTree as root instead of SharedDirectory