# Fluid Framework v2.52.0 ## Contents - [🌳 SharedTree DDS Changes](#-sharedtree-dds-changes) - [Change and clarify limitations related to alpha features allowUnknownOptionalFields and importVerbose (#25074)](#change-and-clarify-limitations-related-to-alpha-features-allowunknownoptionalfields-and-importverbose-25074) - [Fix independentInitializedView when used with ForestTypeExpensiveDebug (#25083)](#fix-independentinitializedview-when-used-with-foresttypeexpensivedebug-25083) - [Allow attaching a SharedTree to an already attached container (#25102)](#allow-attaching-a-sharedtree-to-an-already-attached-container-25102) - [Support unknown optional fields in TreeBeta.clone, TreeAlpha.exportConcise and TreeAlpha.exportVerbose (#25106)](#support-unknown-optional-fields-in-treebetaclone-treealphaexportconcise-and-treealphaexportverbose-25106) - [⚠️ Deprecations](#️-deprecations) - [Moved MinimumVersionForCollab to @fluidframework/runtime-definitions (#25059)](#moved-minimumversionforcollab-to-fluidframeworkruntime-definitions-25059) - [Legacy API Changes](#legacy-api-changes) - [Introduced new interface "IRuntimeStorageService" to replace "IDocumentStorageService" between Runtime and DataStore layers (#25057)](#introduced-new-interface-iruntimestorageservice-to-replace-idocumentstorageservice-between-runtime-and-datastore-layers-25057) - [Introduced new interface "IContainerStorageService" to replace "IDocumentStorageService" between Loader and Runtime layers (#25057)](#introduced-new-interface-icontainerstorageservice-to-replace-idocumentstorageservice-between-loader-and-runtime-layers-25057) - [New ILayerCompatDetails property on LocalDocumentServiceFactory and OdspDocumentServiceFactoryCore (#25120)](#new-ilayercompatdetails-property-on-localdocumentservicefactory-and-odspdocumentservicefactorycore-25120) ## 🌳 SharedTree DDS Changes ### Change and clarify limitations related to alpha features allowUnknownOptionalFields and importVerbose ([#25074](https://github.com/microsoft/FluidFramework/issues/25074)) [allowUnknownOptionalFields](https://fluidframework.com/docs/api/fluid-framework/schemafactoryobjectoptions-interface#allowunknownoptionalfields-propertysignature) currently has some limitations. To mitigate some bugs, [importVerbose](https://fluidframework.com/docs/api/fluid-framework/treealpha-interface#importverbose-methodsignature) has dropped support for unknown optional fields. Previously `importVerbose` would tolerate some unknown optional fields, but could not validate they comply with the document stored schema. This could cause some crashes, and likely document corruption. This support has been removed: now trying to create nodes containing unknown optional fields via `importVerbose` will throw a `UsageError`. There is no longer a way to create and insert nodes which contain subtrees for which there is no schema. Ideally `exportVerbose` and `importVerbose` could be used to round trip data while optionally preserving unknown optional fields, but this is currently not working and thus not supported. If exporting using [useStoredKeys](https://fluidframework.com/docs/api/fluid-framework/treeencodingoptions-interface#usestoredkeys-propertysignature), the unknown optional fields will be preserved but may not be able to be imported. If exporting not using `useStoredKeys`, unknown optional fields will be omitted. #### Change details Commit: [`62dc0b0`](https://github.com/microsoft/FluidFramework/commit/62dc0b0095226ade66648f6fd6b4f13b8c7880d8) Affected packages: - @fluidframework/tree - fluid-framework [⬆️ Table of contents](#contents) ### Fix independentInitializedView when used with ForestTypeExpensiveDebug ([#25083](https://github.com/microsoft/FluidFramework/issues/25083)) Previously, when using [independentInitializedView](https://fluidframework.com/docs/api/tree/#independentinitializedview-function) with [ForestTypeExpensiveDebug](https://fluidframework.com/docs/api/tree/#foresttypeexpensivedebug-variable) and the root schema was not an optional field, an error was thrown about the tree being out of schema. This has been fixed. #### Change details Commit: [`2570b65`](https://github.com/microsoft/FluidFramework/commit/2570b650b64f261fdf8cbfbfddaf3174577a5da2) Affected packages: - @fluidframework/tree - fluid-framework [⬆️ Table of contents](#contents) ### Allow attaching a SharedTree to an already attached container ([#25102](https://github.com/microsoft/FluidFramework/issues/25102)) Before this release, attaching a SharedTree instance to an already attached container would fail with assert code `0x88f` if that instance needed to include data about removed nodes in its attach summary. (This is the case when nodes are removed before attaching and there is a local branch that forks from a commit that made such a removal or from an earlier commit. This is also the case when retaining `Revertible` objects for those commits). After this release, the behavior depends on the `CodecWriteOptions.oldestCompatibleClient` value: - For values < `FluidClientVersion.v2_52`, the behavior is the same. - For values >= `FluidClientVersion.v2_52`, the attach will succeed, but use a newer storage format. Applications should take care to saturate their clients with FF version `2.52` (or greater) before using a `CodecWriteOptions.oldestCompatibleClient` that is equal to or greater than `FluidClientVersion.v2_52`. Failure to do so may lead clients with `CodecWriteOptions.oldestCompatibleClient` equal to or greater than `FluidClientVersion.v2_52` to attach SharedTree instances using a storage format that is not supported by FF versions before `2.52`. This means that application versions using FF versions before `2.52` will be unable to open documents where such an operation has happened. #### Change details Commit: [`3e03f94`](https://github.com/microsoft/FluidFramework/commit/3e03f94f0e3529094304e272df75dae4bf43618e) Affected packages: - @fluidframework/tree - fluid-framework [⬆️ Table of contents](#contents) ### Support unknown optional fields in TreeBeta.clone, TreeAlpha.exportConcise and TreeAlpha.exportVerbose ([#25106](https://github.com/microsoft/FluidFramework/issues/25106)) Trees with [unknown optional fields](https://fluidframework.com/docs/api/fluid-framework/schemafactoryobjectoptions-interface#allowunknownoptionalfields-propertysignature) are now supported in [TreeBeta.clone](https://fluidframework.com/docs/api/tree/treebeta-interface#clone-methodsignature), [TreeBeta.exportConcise](https://fluidframework.com/docs/api/tree/treealpha-interface#exportconcise-methodsignature) and [TreeBeta.exportVerbose](https://fluidframework.com/docs/api/tree/treealpha-interface#exportverbose-methodsignature). Previously, attempts to clone or export such nodes could error in some cases, but should now work robustly. #### Change details Commit: [`e3a126f`](https://github.com/microsoft/FluidFramework/commit/e3a126ffac46bb91e8b553535410d5532b05e662) Affected packages: - @fluidframework/tree - fluid-framework [⬆️ Table of contents](#contents) ## ⚠️ Deprecations ### Moved MinimumVersionForCollab to @fluidframework/runtime-definitions ([#25059](https://github.com/microsoft/FluidFramework/issues/25059)) MinimumVersionForCollab has been moved from @fluidframework/container-runtime to @fluidframework/runtime-definitions. The export in @fluidframework/container-runtime is now deprecated and will be removed in a future version. Consumers should import it from @fluidframework/runtime-definitions going forward. #### Change details Commit: [`4a7b370`](https://github.com/microsoft/FluidFramework/commit/4a7b3706675139af6d8aaae707b96b74081f1fc8) Affected packages: - @fluidframework/container-runtime - @fluidframework/runtime-utils [⬆️ Table of contents](#contents) ## Legacy API Changes ### Introduced new interface "IRuntimeStorageService" to replace "IDocumentStorageService" between Runtime and DataStore layers ([#25057](https://github.com/microsoft/FluidFramework/issues/25057)) Added an interface `IRuntimeStorageService` which will replace `IDocumentStorageService` in the `DataStore` layer. This is exposed by the `Runtime` layer to the `DataStore` layer. This new interface will only contain properties that are needed and used by the `DataStore` layer. The following properties from `IRuntimeStorageService` are deprecated as they are not needed by the `DataStore` layer. These be removed in a future release: - `disposed` - `dispose` - `policies` - `getSnapshotTree` - `getSnapshot` - `getVersions` - `createBlob` - `uploadSummaryWithContext` - `downloadSummary` #### Change details Commit: [`92012de`](https://github.com/microsoft/FluidFramework/commit/92012de5571d4d87cc14bae2f391431764558735) Affected packages: - @fluidframework/runtime-definitions [⬆️ Table of contents](#contents) ### Introduced new interface "IContainerStorageService" to replace "IDocumentStorageService" between Loader and Runtime layers ([#25057](https://github.com/microsoft/FluidFramework/issues/25057)) Added an interface `IContainerStorageService` which will replace `IDocumentStorageService` in the `Runtime` layer. This is exposed by the `Loader` layer to the `Runtime` layer via `ContainerContext`. This will help remove `Runtime` layer's dependency on the `Driver` layer and replace it with the `Loader` layer that it already maintains. This new interface will only contain properties that are needed and used by the `Runtime` layer. The following properties from `IContainerStorageService` are deprecated as they are not needed by the `DataStore` layer. These be removed in a future release: - `policies` - The Runtime only needs `maximumCacheDurationMs` property from it which is added directly on `IContainerStorageService`. - `downloadSummary` - `disposed` - `dispose` #### Change details Commit: [`92012de`](https://github.com/microsoft/FluidFramework/commit/92012de5571d4d87cc14bae2f391431764558735) Affected packages: - @fluidframework/container-definitions [⬆️ Table of contents](#contents) ### New ILayerCompatDetails property on LocalDocumentServiceFactory and OdspDocumentServiceFactoryCore ([#25120](https://github.com/microsoft/FluidFramework/issues/25120)) A new optional property, `ILayerCompatDetails`, has been added to `LocalDocumentServiceFactory` and `OdspDocumentServiceFactoryCore`. This property is used by `Container` in the Loader layer to validate that the Loader and Driver layers are compatible. Important: this property is intended for use by Fluid Framework code only. No code outside the Fluid Framework should use or depend on this property in any way. #### Change details Commit: [`02accca`](https://github.com/microsoft/FluidFramework/commit/02acccaa06bf377ceb044e3eac4ba6ebb89e3d4f) Affected packages: - @fluidframework/local-driver - @fluidframework/odsp-driver [⬆️ Table of contents](#contents) ### 🛠️ Start Building Today! Please continue to engage with us on GitHub [Discussion](https://github.com/microsoft/FluidFramework/discussions) and [Issue](https://github.com/microsoft/FluidFramework/issues) pages as you adopt Fluid Framework!