Skip to content

Fluid Framework v2.12.0 (minor)

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 17 Dec 21:44
· 31 commits to main since this release
f1be6e3

Contents

✨ New Features

New APIs to create and load containers without using the Loader object (#22902)

Overview

Provide standalone APIs to create and load containers instead of using the Loader object to do so. Before, hosts were supposed to create the Loader object first and then call methods on it to create and load containers. Now they can just utilize these APIs directly and get rid of the Loader object.

Use createDetachedContainer to create a detached container
export async function createDetachedContainer(
  createDetachedContainerProps: ICreateDetachedContainerProps,
): Promise<IContainer> {}

ICreateDetachedContainerProps are the properties that need to be supplied to the above API and include props like URL Resolver, IDocumentServiceFactory, etc., which were previously used to create the Loader object.

Use loadExistingContainer to load an existing container
export async function loadExistingContainer(
  loadExistingContainerProps: ILoadExistingContainerProps,
): Promise<IContainer> {}

ILoadExistingContainerProps are the properties that need to be supplied to the above API and include props like URL Resolver, IDocumentServiceFactory, etc., which were earlier used to create the Loader object.

Use rehydrateDetachedContainer to create a detached container from a serializedState of another container
export async function rehydrateDetachedContainer(
  rehydrateDetachedContainerProps: IRehydrateDetachedContainerProps,
): Promise<IContainer> {}

IRehydrateDetachedContainerProps are the properties that need to be supplied to the above API and include props like URL Resolver, IDocumentServiceFactory, etc., which were earlier used to create the Loader object.

Note on ICreateAndLoadContainerProps.

The props which were used to create the Loader object are now moved to the ICreateAndLoadContainerProps interface. ICreateDetachedContainerProps, ILoadExistingContainerProps and IRehydrateDetachedContainerProps which extends ICreateAndLoadContainerProps also contain some additional props which will be used to create and load containers like IFluidCodeDetails, IRequest, etc. Previously these were directly passed when calling APIs like Loader.createDetachedContainer, Loader.resolve and Loader.rehydrateDetachedContainerFromSnapshot on the Loader object. Also, ILoaderProps.ILoaderOptions are now replaced with ICreateAndLoadContainerProps.IContainerPolicies since there will be no concept of Loader.

Change details

Commit: 51a1728

Affected packages:

  • @fluidframework/azure-client
  • @fluidframework/container-definitions
  • @fluidframework/container-loader
  • @fluidframework/fluid-runner
  • @fluidframework/odsp-client
  • @fluid-experimental/property-dds
  • @fluid-private/test-end-to-end-tests
  • @fluidframework/test-utils
  • @fluidframework/tinylicious-client
  • @fluidframework/tree

⬆️ Table of contents

⚠️ Deprecations

SummarizerStopReason, ISummarizeEventProps, and ISummarizerEvents are now deprecated (#23217)

SummarizerStopReason, ISummarizeEventProps, and ISummarizerEvents have all been deprecated from the "@fluidframework/container-runtime" package. Please migrate all uses of these APIs to their counterparts in the "@fluidframework/container-runtime-definitions" package.

Change details

Commit: cd88ee2

Affected packages:

  • @fluidframework/container-runtime

⬆️ Table of contents

IContainerRuntimeOptions.enableGroupedBatching is now deprecated (#23260)

The IContainerRuntimeOptions.enableGroupedBatching property is deprecated and will be removed in version 2.20.0. This will mean that the grouped batching feature can no longer be disabled. In versions 2.20.0 and beyond, grouped batching is required for the proper functioning of the Fluid Framework.

The sole case where grouped batching will be disabled is for compatibility with older v1 clients, and this will be implemented without any need for the configurable IContainerRuntimeOptions.enableGroupedBatching option.

Change details

Commit: 49d8e75

Affected packages:

  • @fluidframework/container-runtime
  • @fluidframework/fluid-static

⬆️ Table of contents

IContainerRuntimeOptions.flushMode is now deprecated (#23288)

The IContainerRuntimeOptions.flushMode property is deprecated and will be removed in version 2.20.0.

Only the default value FlushMode.TurnBased is supported when calling ContainerRuntime.loadRuntime directly, so there's no need for consumers to pass this option in.

Change details

Commit: af1cd7b

Affected packages:

  • @fluidframework/container-runtime

⬆️ Table of contents

Merge-Tree and SharedString ISegment Deprecations (#23323)

The current ISegment interface over-exposes a number of properties which do not have an external use case, and any external usage could result in damage to the underlying merge-tree including data corruption.

The only use case that will continue to be supported is determining if a segment is removed. For this purpose we've added the free function segmentIsRemoved(segment: ISegment): boolean.

For example, checking if a segment is not removed would change as follows:

- if(segment.removedSeq === undefined){
+ if(!segmentIsRemoved(segment)){

The following properties are deprecated on ISegment and its implementations:

  • clientId
  • index
  • localMovedSeq
  • localRefs
  • localRemovedSeq
  • localSeq
  • movedClientsIds
  • movedSeq
  • movedSeqs
  • ordinal
  • removedClientIds
  • removedSeq
  • seq
  • wasMovedOnInsert

Additionally, the following types are also deprecated, and will become internal (i.e. users of the Fluid Framework will not have access to them):

  • IMergeNodeCommon
  • IMoveInfo
  • IRemovalInfo
  • LocalReferenceCollection

Change details

Commit: e8762e3

Affected packages:

  • @fluidframework/merge-tree
  • @fluidframework/sequence

⬆️ Table of contents

The ContainerRuntime class is now deprecated (#23331)

The class ContainerRuntime is deprecated and will no longer be exported starting in version 2.20.0.

There are two possible migration paths to stop using ContainerRuntime:

  • When using it as a type, replace it with an interface like IContainerRuntime
  • When using the static function ContainerRuntime.loadRuntime replace it with the free function loadContainerRuntime.

BaseContainerRuntimeFactory has some changes as well, since it exposed ContainerRuntime in several function signatures:

  • instantiateFirstTime - Takes the wider type IContainerRuntime instead of ContainerRuntime
  • instantiateFromExisting - Takes the wider type IContainerRuntime instead of ContainerRuntime
  • preInitialize - deprecated as well, since it returns ContainerRuntime

These functions should never be called directly anyway - use BaseContainerRuntimeFactory.instantiateRuntime instead.

Change details

Commit: dc48446

Affected packages:

  • @fluidframework/aqueduct
  • @fluidframework/container-runtime

⬆️ Table of contents

🛠️ Start Building Today!

Please continue to engage with us on GitHub Discussion and Issue pages as you adopt Fluid Framework!