Skip to content

Commit

Permalink
Merge branch 'next' into main-next-cbb9ed6b822e10b4be534ce7ccf2eee8bd…
Browse files Browse the repository at this point in the history
…c83e3c
  • Loading branch information
yann-achard-MS authored Aug 22, 2022
2 parents cbb9ed6 + 271f3d1 commit cf8fcec
Show file tree
Hide file tree
Showing 234 changed files with 6,402 additions and 18,651 deletions.
167 changes: 116 additions & 51 deletions BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ It's important to communicate breaking changes to our stakeholders. To write a g
- [Remove `type` field from `ShareLinkInfoType`](#Remove-type-field-from-ShareLinkInfoType)
- [Remove `ShareLinkTypes` interface](#Remove-ShareLinkTypes-interface)
- [Remove `enableShareLinkWithCreate` from `HostStoragePolicy`](#Remove-enableShareLinkWithCreate-from-HostStoragePolicy)
- [Signature from `ISummarizerInternalsProvider.refreshLatestSummaryAck` interface has changed](#Change-ISummarizerInternalsProvider.refreshLatestSummaryAck-interface)
- [Move `TelemetryNullLogger` and `BaseTelemetryNullLogger` to telemetry-utils package](#Move-`TelemetryNullLogger`-and-`BaseTelemetryNullLogger`-to-telemetry-utils-package)
- [Minor event naming correction on IFluidContainerEvents](#IFluidContainerEvents-event-naming-correction)

### Remove `type` field from `ShareLinkInfoType`
This field has been deprecated and will be removed in a future breaking change. You should be able to get the kind of sharing link from `shareLinkInfo.createLink.link` property bag.

Expand All @@ -36,85 +40,81 @@ This field has been deprecated and will be removed in a future breaking change.
fileName: string,
- createShareLinkType?: ShareLinkTypes,
+ createShareLinkType?: ShareLinkTypes | ISharingLinkKind,
):
):
```


### Remove `enableShareLinkWithCreate` from `HostStoragePolicy`
`enableShareLinkWithCreate` feature gate has been deprecated and will be removed in a future breaking change. If you wish to enable creation of a sharing link along with the creation of Fluid file, you will need to provide `createShareLinkType:ISharingLinkKind` input to the `createOdspCreateContainerRequest` function and enable the feature using `enableSingleRequestForShareLinkWithCreate` in `HostStoragePolicy`
# 2.0.0

## 2.0.0 Upcoming changes
- [Remove `documentId` field from `MockFluidDataStoreContext`](#Remove-documentId-field-from-MockFluidDataStoreContext)
- [Narrow type of `clientId` field on `MockFluidDataStoreRuntime`](#Narrow-type-of-clientId-field-on-MockFluidDataStoreRuntime)
- [Remove `ConnectionState.Connecting`](#Remove-ConnectionState.Connecting)
- [`IContainerRuntime.flush` is deprecated](#icontainerruntimeflush-is-deprecated)
- [MergeTree class is deprecated](#MergeTree-class-is-deprecated)
- [Various return types in `@fluidframework/sequence` have been widened to include `undefined`](#various-return-types-in-fluidframeworksequence-have-been-widened-to-include-undefined)
- [`getTextAndMarkers` changed to be a free function](#gettextandmarkers-changed-to-be-a-free-function)
### Change-ISummarizerInternalsProvider.refreshLatestSummaryAck-interface
`ISummarizerInternalsProvider.refreshLatestSummaryAck` interface has been updated to now accept `IRefreshSummaryAckOptions` property instead.
```diff
async refreshLatestSummaryAck(
- proposalHandle: string | undefined,
- ackHandle: string,
- summaryRefSeq: number,
- summaryLogger: ITelemetryLogger,
+ options: IRefreshSummaryAckOptions,
):
```

### Various return types in `@fluidframework/sequence` have been widened to include `undefined`
### Move `TelemetryNullLogger` and `BaseTelemetryNullLogger` to telemetry-utils package
The utility classes `TelemetryNullLogger` and `BaseTelemetryNullLogger` are deprecated in the `@fluidframework/common-utils` package and have been moved to the `@fluidframework/telemetry-utils` package. Please update your imports to take these from the new location.

Strict null checks have been enabled in `@fluidframework/sequence`. As part of this, the return types of several functions have been modified to include `| undefined`. This does not represent a behavioral change.
### IFluidContainerEvents event naming correction
Renamed **dispose** to **disposed** to better communicate the state and align with currently emitted event.
It's not a breaking change, but worth noting: we are now also exposing optional error (ICriticalContainerError) field with **disposed** event.

The functions affected are:
- `Interval.getAdditionalPropertySets`
- `Interval.modify`
- `IntervalCollection.getIntervalById`
- `IntervalCollection.nextInterval`
- `IntervalCollection.previousInterval`
- `IntervalCollection.removeIntervalById`
- `ISharedString.insertMarker`
- `PaddingSegment.fromJSONObject`
- `RunSegment.createSplitSegmentAt`
- `RunSegment.fromJSONObject`
- `SequenceEvent.clientId`
- `SharedSegmentSequence.getPropertiesAtPosition`
- `SharedSegmentSequence.removeLocalReferencePosition`
- `SharedSegmentSequence.resolveRemoteClientPosition`
- `SharedString.findTile`
- `SharedString.getMarkerFromId`
- `SharedString.insertMarker`
- `SparseMatrix.getItem`
- `SparseMatrix.getPositionProperties`
- `SubSequence.createSplitSegmentAt`
- `SubSequence.fromJSONObject`

### Remove `documentId` field from `MockFluidDataStoreContext`
This field has been deprecated and will be removed in a future breaking change.
# 2.0.0

### Narrow type of `clientId` field on `MockFluidDataStoreRuntime`
`clientId` can only ever be of type `string`, so it is superfluous for the type
to be `string | undefined`.
## 2.0.0 Upcoming changes
- [Remove `ConnectionState.Connecting`](#remove-connectionstateconnecting)
- [`IContainerRuntime.flush` is deprecated](#icontainerruntimeflush-is-deprecated)

### Remove `ConnectionState.Connecting`
`ConnectionState.Connecting` will be removed. Migrate all usage to `ConnectionState.CatchingUp`.

### `IContainerRuntime.flush` is deprecated
`IContainerRuntime.flush` is deprecated and will be removed in a future release. If a more manual flushing process is needed, move all usage to `IContainerRuntimeBase.orderSequentially` if possible.

### MergeTree class is deprecated
The MergeTree class is deprecated and will no longer be exported in the next release. This should not affect usage as MergeTree is an internal class, and the public API exists on the Client class, which will continue to be exported and supported.

### `getTextAndMarkers` changed to be a free function

`SharedString.getTextAndMarkers` involves a sizeable amount of model-specific logic.
To improve bundle size, it will be converted to a free function so that this logic is tree-shakeable.
The corresponding method on `IMergeTreeTexHelper` will also be removed.

## 2.0.0 Breaking changes
- [Deprecate ISummaryConfigurationHeuristics.idleTime](#Deprecate-ISummaryConfigurationHeuristicsidleTime)
- [LocalReference class and method deprecations removed](#LocalReference-class-and-method-deprecations-removed)
- [IntervalCollection event semantics changed](#IntervalCollection-event-semantics-changed)
- [Remove TelemetryDataTag.PackageData](#Remove-TelemetryDataTagPackageData)
- [Remove ICodeLoader from @fluidframework/container-definitions](#Remove-ICodeLoader-from-@fluidframework/container-definitions)
- [Deprecate ISummaryRuntimeOptions.disableIsolatedChannels](#Deprecate-ISummaryRuntimeOptionsdisableIsolatedChannels)
- [Remove `documentId` field from `MockFluidDataStoreContext`](#Remove-documentId-field-from-MockFluidDataStoreContext)
- [Narrow type of `clientId` field on `MockFluidDataStoreRuntime`](#Narrow-type-of-clientId-field-on-MockFluidDataStoreRuntime)
- [Remove ConnectionState.Connecting](#Remove-ConnectionState.Connecting)
- [Remove ISummaryAuthor and ISummaryCommitter](#Remove-ISummaryAuthor-and-ISummaryCommitter)
- [Remove IFluidDataStoreChannel.bindToContext and related types](#remove-ifluiddatastorechannelbindtocontext-and-related-types)
- [Remove IFluidDataStoreChannel.
bindToContext and related types](#remove-ifluiddatastorechannelbindtocontext-and-related-types)
- [Remove `aliasing` return value from `AliasResult`](#remove-aliasing-return-value-from-aliasresult)
- [Various return types in `@fluidframework/sequence` have been widened to include `undefined`](#various-return-types-in-fluidframeworksequence-have-been-widened-to-include-undefined)
- [MergeTree class no longer exported](#MergeTree-class-no-longer-exported)
- [Marker.toString simplified](#markertostring-simplified)
- [Remove `IContainerRuntimeBase.setFlushMode`](#remove-icontainerruntimebasesetflushmode)
- [`getTextAndMarkers` changed to be a free function](#gettextandmarkers-changed-to-be-a-free-function)
- [OldestClientObserver moved to @fluid-experimental/oldest-client-observer](#oldestclientobserver-moved-to-@fluid-experimental/oldest-client-observer)
- [Creating root datastores using `IContainerRuntime.CreateRootDataStore` and `IContainerRuntimeBase._createDataStoreWithProps` is no longer supported](#Creating-root-datastores-using-IContainerRuntimeCreateRootDataStore-and-IContainerRuntimeBase_createDataStoreWithProps-is-no-longer-supported)
- [Remove deprecated data structures from `@fluidframework/sequence`](#remove-deprecated-data-structures-from-fluidframeworksequence)

### Update to React 17
The following packages use React and thus were impacted:
- @fluidframework/view-adapters
- @fluid-tools/webpack-fluid-loader
- @fluid-experimental/react-inputs
- @fluid-experimental/property-inspector-table

Users of these packages may need to update to React 17, and/or take other action to ensure compatibility.

### Remove `documentId` field from `MockFluidDataStoreContext`
This field has been deprecated and will be removed in a future breaking change.

### Narrow type of `clientId` field on `MockFluidDataStoreRuntime`
`clientId` can only ever be of type `string`, so it is superfluous for the type
to be `string | undefined`.

### Deprecate ISummaryConfigurationHeuristics.idleTime
`ISummaryConfigurationHeuristics.idleTime` has been deprecated and will be removed in a future release. See [#10008](https://github.com/microsoft/FluidFramework/issues/10008)
Expand All @@ -134,6 +134,20 @@ The following deprecated methods are now removed from sequence and merge-tree.
- localRefToPos to localReferencePositionToPosition
- removeLocalReference to removeLocalReferencePosition

### IntervalCollection event semantics changed

The semantics of events emitted by IntervalCollection were changed to be more consistent:

- propertyChanged events receive the same "isLocal" and op information that other events received
- changeInterval events will no longer take place for changes that impact an interval's properties only. Clients that need to perform work on such changes should listen to "propertyChanged" events instead.
- For local changes, changeInterval events will only be emitted on initial application of the change (as opposed to the
previous behavior, which fired an event on the local application of a change as well as on server ack of that change))
- changeInterval events now receive information about the interval's previous position.
- addInterval and deleteInterval event handler now properly reflects that the `op` argument can be undefined. This was true
before, but not reflected in the type system.

More details can be found on `IIntervalCollectionEvent`'s doc comment.

### Remove TelemetryDataTag.PackageData
`TelemetryDataTag.PackageData` has been removed. Migrate all usage to `TelemetryDataTag.CodeArtifact` instead.

Expand All @@ -150,9 +164,60 @@ See previous ["Upcoming" change notice](#bindToContext-to-be-removed-from-IFluid
### Remove `aliasing` return value from `AliasResult`
The `aliasing` return value from `AliasResult` has been removed from `@fluidframework/runtime-definitions`, as it's no longer returned by the API. Instead of `aliasing`, the API will return the promise of the ongoing aliasing operation.

### Various return types in `@fluidframework/sequence` have been widened to include `undefined`

Strict null checks have been enabled in `@fluidframework/sequence`. As part of this, the return types of several functions have been modified to include `| undefined`. This does not represent a behavioral change.

The functions affected are:
- `Interval.getAdditionalPropertySets`
- `Interval.modify`
- `IntervalCollection.getIntervalById`
- `IntervalCollection.nextInterval`
- `IntervalCollection.previousInterval`
- `IntervalCollection.removeIntervalById`
- `ISharedString.insertMarker`
- `PaddingSegment.fromJSONObject`
- `RunSegment.createSplitSegmentAt`
- `RunSegment.fromJSONObject`
- `SequenceEvent.clientId`
- `SharedSegmentSequence.getPropertiesAtPosition`
- `SharedSegmentSequence.removeLocalReferencePosition`
- `SharedSegmentSequence.resolveRemoteClientPosition`
- `SharedString.findTile`
- `SharedString.getMarkerFromId`
- `SharedString.insertMarker`
- `SparseMatrix.getItem`
- `SparseMatrix.getPositionProperties`
- `SubSequence.createSplitSegmentAt`
- `SubSequence.fromJSONObject`

### MergeTree class no longer exported
The MergeTree class was deprecated and is no longer be exported. This should not affect usage as MergeTree is an internal class, and the public API exists on the Client class, which will continue to be exported and supported.

### Marker.toString simplified

In merge-tree, Marker's string representation returned by `toString` was simplified.
This new representation is used in the return value of `SharedString.getTextRangeWithMarkers`.
The previous logic was moved to the public export `debugMarkerToString`.

### Remove `IContainerRuntimeBase.setFlushMode`
The `setFlushMode` has been removed from `IContainerRuntimeBase`. FlushMode is now an immutable property for the container runtime, optionally provided at creation time via the `IContainerRuntimeOptions` interface. Instead, batching when in `FlushMode.Immediate` should be done through usage of the `IContainerRuntimeBase.orderSequentially`. See [#9480](https://github.com/microsoft/FluidFramework/issues/9480#issuecomment-1084790977).

### `getTextAndMarkers` changed to be a free function

`SharedString.getTextAndMarkers` involves a sizeable amount of model-specific logic.
To improve bundle size, it will be converted to a free function so that this logic is tree-shakeable.
The corresponding method on `IMergeTreeTexHelper` will also be removed.

### OldestClientObserver moved to @fluid-experimental/oldest-client-observer
The `OldestClientObserver` class and its associated interfaces have been removed from @fluid-experimental/task-manager and moved to the new package @fluid-experimental/oldest-client-observer. Please migrate all imports to @fluid-experimental/oldest-client-observer.

### Creating root datastores using `IContainerRuntime.CreateRootDataStore` and `IContainerRuntimeBase._createDataStoreWithProps` is no longer supported
The `IContainerRuntime.CreateRootDataStore` method has been removed. Please use aliasing instead. See [IContainerRuntime.createRootDataStore is deprecated](#icontainerruntimecreaterootdatastore-is-deprecated). The `isRoot` parameter from `IContainerRuntimeBase._createDataStoreWithProps` has also been removed. Additionally, the feature gate which would switch to using aliasing behind the aforementioned deleted APIs, `Fluid.ContainerRuntime.UseDataStoreAliasing` will no longer be observed by the runtime. As aliasing is the default behavior for creating such datastores, the `useDataStoreAliasing` property from `IContainerRuntimeOptions` has been removed.

### Remove deprecated data structures from `@fluidframework/sequence`
`SharedNumberSequence`, `SharedObjectSequence`, and `SharedMatrix` have been removed from `@fluidframework/sequence`. They are currently still available in `@fluid-experimental/sequence-deprecated.

# 1.2.0

## 1.2.0 Upcoming changes
Expand Down
39 changes: 23 additions & 16 deletions api-report/container-runtime.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents>
get disposed(): boolean;
// (undocumented)
readonly enqueueSummarize: ISummarizer["enqueueSummarize"];
// (undocumented)
flush(): void;
flush(isImmediateBatch?: boolean): void;
// (undocumented)
get flushMode(): FlushMode;
// (undocumented)
Expand Down Expand Up @@ -155,7 +154,7 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents>
process(messageArg: ISequencedDocumentMessage, local: boolean): void;
// (undocumented)
processSignal(message: ISignalMessage, local: boolean): void;
refreshLatestSummaryAck(proposalHandle: string | undefined, ackHandle: string, summaryRefSeq: number, summaryLogger: ITelemetryLogger): Promise<void>;
refreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void>;
request(request: IRequest): Promise<IResponse>;
resolveHandle(request: IRequest): Promise<IResponse>;
// (undocumented)
Expand All @@ -167,8 +166,6 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents>
// (undocumented)
setConnectionState(connected: boolean, clientId?: string): void;
// (undocumented)
setFlushMode(mode: FlushMode): void;
// (undocumented)
get storage(): IDocumentStorageService;
// (undocumented)
submitDataStoreAliasOp(contents: any, localOpMetadata: unknown): void;
Expand Down Expand Up @@ -309,6 +306,11 @@ export interface IClientSummaryWatcher extends IDisposable {
watchSummary(clientSequenceNumber: number): ISummary;
}

// @public
export interface ICompressionRuntimeOptions {
readonly minimumSize?: number;
}

// @public (undocumented)
export interface IConnectableRuntime {
// (undocumented)
Expand All @@ -325,6 +327,7 @@ export interface IConnectableRuntime {

// @public
export interface IContainerRuntimeOptions {
readonly compressionOptions?: ICompressionRuntimeOptions;
readonly enableOfflineLoad?: boolean;
readonly flushMode?: FlushMode;
// (undocumented)
Expand Down Expand Up @@ -413,14 +416,6 @@ export interface IPendingFlush {
type: "flush";
}

// @public
export interface IPendingFlushMode {
// (undocumented)
flushMode: FlushMode;
// (undocumented)
type: "flushMode";
}

// @public (undocumented)
export interface IPendingLocalState {
pendingStates: IPendingState[];
Expand All @@ -445,14 +440,22 @@ export interface IPendingMessage {
}

// @public (undocumented)
export type IPendingState = IPendingMessage | IPendingFlushMode | IPendingFlush;
export type IPendingState = IPendingMessage | IPendingFlush;

// @public @deprecated (undocumented)
export interface IProvideSummarizer {
// @deprecated (undocumented)
readonly ISummarizer: ISummarizer;
}

// @public
export interface IRefreshSummaryAckOptions {
readonly ackHandle: string;
readonly proposalHandle: string | undefined;
readonly summaryLogger: ITelemetryLogger;
readonly summaryRefSeq: number;
}

// @public
export interface IRootSummaryTreeWithStats extends ISummaryTreeWithStats {
gcStats?: IGCStats;
Expand Down Expand Up @@ -510,7 +513,7 @@ export interface ISummarizerEvents extends IEvent {

// @public (undocumented)
export interface ISummarizerInternalsProvider {
refreshLatestSummaryAck(proposalHandle: string, ackHandle: string, summaryRefSeq: number, summaryLogger: ITelemetryLogger): Promise<void>;
refreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void>;
submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;
}

Expand Down Expand Up @@ -742,7 +745,11 @@ export type SummarizerStopReason =
* client to no longer be elected as responsible for summaries. Then it
* tries to stop its spawned summarizer client.
*/
| "parentShouldNotSummarize"
| "notElectedParent"
/**
* We are not already running the summarizer and we are not the current elected client id.
*/
| "notElectedClient"
/** Summarizer client was disconnected */
| "summarizerClientDisconnected" | "summarizerException";

Expand Down
Loading

0 comments on commit cf8fcec

Please sign in to comment.