Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…to feat/partial-length-unit-tests
  • Loading branch information
Connor Skees committed Aug 16, 2022
2 parents a956d87 + 485c8df commit d7fad08
Show file tree
Hide file tree
Showing 741 changed files with 23,661 additions and 14,501 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Fluid Development Container based on "docker-from-docker" template:
# https://github.com/microsoft/vscode-dev-containers/blob/master/containers/docker-from-docker/.devcontainer/Dockerfile

ARG NODE_VERSION=12
ARG NODE_VERSION=14

# 'node:${VARIANT}' base image includes the following:
#
Expand Down
9 changes: 7 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dockerfile": "Dockerfile",
// Update 'NODE_VERSION' to pick a Node version: 10, 12, 14
"args": {
"NODE_VERSION": "12"
"NODE_VERSION": "14"
}
},
"runArgs": [ "--init" ],
Expand All @@ -30,5 +30,10 @@
"postCreateCommand": ". /usr/local/share/nvm/nvm.sh; nvm install",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
"remoteUser": "node",
"features": {
"azure-cli": "latest",
"github-cli": "latest",
"git-lfs": "latest"
}
}
31 changes: 28 additions & 3 deletions .github/fabricbot.json
Original file line number Diff line number Diff line change
Expand Up @@ -703,15 +703,40 @@
"taskName": "Automatically squash-merge pull requests in next",
"label": "msftbot: merge-next",
"silentMode": false,
"minMinutesOpen": 480,
"mergeType": "squash",
"minMinutesOpen": "5",
"deleteBranches": true,
"allowAutoMergeInstructionsWithoutLabel": true,
"enforceDMPAsStatus": true,
"removeLabelOnPush": true,
"usePrDescriptionAsCommitMessage": true,
"requireAllStatuses": false,
"conditionalMergeTypes": []
"conditionalMergeTypes": [
{
"mergeType": "squash",
"condition": {
"placeholder": "labels",
"operator": "notContains",
"label_name": "do-not-squash-merge"
}
},
{
"mergeType": "squash",
"condition": {
"placeholder": "labels",
"operator": "notContains",
"label_name": "main-next-integrate"
}
},
{
"mergeType": "squash",
"condition": {
"placeholder": "author",
"operator": "notEquals",
"value": "github-actions"
}
}
],
"mergeType": "squash"
},
"disabled": false
},
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/merge-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ jobs:
'tylerbutler',
]
});
await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/labels', {
owner: 'microsoft',
repo: 'FluidFramework',
issue_number: newPr.data.number,
labels: [
'main-next-integrate',
'do-not-squash-merge'
]
})
remove-from-queue:
runs-on: ubuntu-latest
concurrency:
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"cSpell.words": [
"injective",
"losslessly",
"mitigations",
"multinomial",
"nonfinite",
"pseudorandomly",
"unaugmented"
],
Expand Down
36 changes: 36 additions & 0 deletions BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@ It's important to communicate breaking changes to our stakeholders. To write a g
- Avoid using code formatting in the title (it's fine to use in the body).
- To explain the benefit of your change, use the [What's New](https://fluidframework.com/docs/updates/v1.0.0/) section on FluidFramework.com.

# 3.0.0

## 3.0.0 Upcoming changes
- [Remove `type` field from `ShareLinkInfoType`](#Remove-type-field-from-ShareLinkInfoType)
- [Remove `ShareLinkTypes` interface](#Remove-ShareLinkTypes-interface)
- [Remove `enableShareLinkWithCreate` from `HostStoragePolicy`](#Remove-enableShareLinkWithCreate-from-HostStoragePolicy)
### 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.

### Remove `ShareLinkTypes` interface
`ShareLinkTypes` interface has been deprecated and will be removed in a future breaking change. Singnature of `createOdspCreateContainerRequest` has been updated to now accept `ISharingLinkKind` property instead.
```diff
function createOdspCreateContainerRequest(
siteUrl: string,
driveId: string,
filePath: string,
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
Expand All @@ -26,6 +51,7 @@ It's important to communicate breaking changes to our stakeholders. To write a g
- [`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)

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

Expand Down Expand Up @@ -70,6 +96,12 @@ to be `string | undefined`.
### 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)
Expand All @@ -82,6 +114,7 @@ to be `string | undefined`.
- [Remove ISummaryAuthor and ISummaryCommitter](#Remove-ISummaryAuthor-and-ISummaryCommitter)
- [Remove IFluidDataStoreChannel.bindToContext and related types](#remove-ifluiddatastorechannelbindtocontext-and-related-types)
- [Remove `aliasing` return value from `AliasResult`](#remove-aliasing-return-value-from-aliasresult)
- [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)

### 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 Down Expand Up @@ -117,6 +150,9 @@ 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.

### 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.

# 1.2.0

## 1.2.0 Upcoming changes
Expand Down
2 changes: 0 additions & 2 deletions api-report/container-runtime-definitions.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export interface IContainerRuntime extends IProvideContainerRuntime, IProvideFlu
// (undocumented)
readonly connected: boolean;
createDetachedRootDataStore(pkg: Readonly<string[]>, rootDataStoreId: string): IFluidDataStoreContextDetached;
// @deprecated
createRootDataStore(pkg: string | string[], rootDataStoreId: string): Promise<IFluidRouter>;
// (undocumented)
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
// @deprecated
Expand Down
17 changes: 2 additions & 15 deletions api-report/container-runtime.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import { IResponse } from '@fluidframework/core-interfaces';
import { IRuntime } from '@fluidframework/container-definitions';
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
import { ISignalMessage } from '@fluidframework/protocol-definitions';
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
import { ISnapshotTreeWithBlobContents } from '@fluidframework/container-definitions';
import { ISummaryAck } from '@fluidframework/protocol-definitions';
import { ISummaryContent } from '@fluidframework/protocol-definitions';
Expand Down Expand Up @@ -95,13 +94,11 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents>
// (undocumented)
createDataStore(pkg: string | string[]): Promise<IDataStore>;
// (undocumented)
_createDataStoreWithProps(pkg: string | string[], props?: any, id?: string, isRoot?: boolean): Promise<IDataStore>;
_createDataStoreWithProps(pkg: string | string[], props?: any, id?: string): Promise<IDataStore>;
// (undocumented)
createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;
// (undocumented)
createDetachedRootDataStore(pkg: Readonly<string[]>, rootDataStoreId: string): IFluidDataStoreContextDetached;
// @deprecated (undocumented)
createRootDataStore(pkg: string | string[], rootDataStoreId: string): Promise<IFluidRouter>;
createSummary(blobRedirectTable?: Map<string, string>, telemetryContext?: ITelemetryContext): ISummaryTree;
deleteUnusedRoutes(unusedRoutes: string[]): void;
// (undocumented)
Expand All @@ -127,7 +124,7 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents>
// Warning: (ae-forgotten-export) The symbol "GCNodeType" needs to be exported by the entry point index.d.ts
getNodeType(nodePath: string): GCNodeType;
// (undocumented)
getPendingLocalState(): IPendingRuntimeState;
getPendingLocalState(): unknown;
// (undocumented)
getQuorum(): IQuorumClients;
// (undocumented)
Expand Down Expand Up @@ -335,7 +332,6 @@ export interface IContainerRuntimeOptions {
readonly loadSequenceNumberVerification?: "close" | "log" | "bypass";
// (undocumented)
readonly summaryOptions?: ISummaryRuntimeOptions;
readonly useDataStoreAliasing?: boolean;
}

// @public
Expand Down Expand Up @@ -448,15 +444,6 @@ export interface IPendingMessage {
type: "message";
}

// @public
export interface IPendingRuntimeState {
baseSnapshot: ISnapshotTree;
pending?: IPendingLocalState;
savedOps: ISequencedDocumentMessage[];
// Warning: (ae-forgotten-export) The symbol "ISerializedBaseSnapshotBlobs" needs to be exported by the entry point index.d.ts
snapshotBlobs: ISerializedBaseSnapshotBlobs;
}

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

Expand Down
34 changes: 11 additions & 23 deletions api-report/merge-tree.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,21 +448,17 @@ export interface IMarkerModifiedAction {
(marker: Marker): void;
}

// @public (undocumented)
// @public
export interface IMergeBlock extends IMergeNodeCommon {
// (undocumented)
assignChild(child: IMergeNode, index: number, updateOrdinal?: boolean): void;
// (undocumented)
childCount: number;
// (undocumented)
children: IMergeNode[];
// (undocumented)
hierBlock(): IHierBlock | undefined;
// (undocumented)
needsScour?: boolean;
// Warning: (ae-forgotten-export) The symbol "PartialSequenceLengths" needs to be exported by the entry point index.d.ts
//
// (undocumented)
partialLengths?: PartialSequenceLengths;
// (undocumented)
setOrdinal(child: IMergeNode, index: number): void;
Expand All @@ -471,14 +467,12 @@ export interface IMergeBlock extends IMergeNodeCommon {
// @public (undocumented)
export type IMergeNode = IMergeBlock | ISegment;

// @public (undocumented)
// @public
export interface IMergeNodeCommon {
cachedLength: number;
// (undocumented)
index: number;
// (undocumented)
isLeaf(): this is ISegment;
// (undocumented)
ordinal: string;
// (undocumented)
parent?: IMergeBlock;
Expand Down Expand Up @@ -592,7 +586,7 @@ export interface IMergeTreeSegmentDelta {
export interface IMergeTreeTextHelper {
// (undocumented)
getText(refSeq: number, clientId: number, placeholder: string, start?: number, end?: number): string;
// (undocumented)
// @deprecated (undocumented)
getTextAndMarkers(refSeq: number, clientId: number, label: string, start?: number, end?: number): {
parallelText: string[];
parallelMarkers: Marker[];
Expand Down Expand Up @@ -741,11 +735,10 @@ export interface IRelativePosition {
offset?: number;
}

// @public (undocumented)
// @public
export interface IRemovalInfo {
// (undocumented)
localRemovedSeq?: number;
removedClientIds: number[];
// (undocumented)
removedSeq: number;
}

Expand All @@ -759,23 +752,16 @@ export interface ISegment extends IMergeNodeCommon, Partial<IRemovalInfo> {
append(segment: ISegment): void;
// (undocumented)
canAppend(segment: ISegment): boolean;
// (undocumented)
clientId: number;
// (undocumented)
clone(): ISegment;
// (undocumented)
localRefs?: LocalReferenceCollection;
// (undocumented)
localRemovedSeq?: number;
// (undocumented)
localSeq?: number;
// (undocumented)
properties?: PropertySet;
// (undocumented)
propertyManager?: PropertiesManager;
// (undocumented)
readonly segmentGroups: SegmentGroupCollection;
// (undocumented)
seq?: number;
// (undocumented)
splitAt(pos: number): ISegment | undefined;
Expand Down Expand Up @@ -1023,7 +1009,7 @@ export class MergeTree {
// (undocumented)
getCollabWindow(): CollaborationWindow;
// (undocumented)
getContainingSegment<T extends ISegment>(pos: number, refSeq: number, clientId: number): {
getContainingSegment<T extends ISegment>(pos: number, refSeq: number, clientId: number, localSeq?: number): {
segment: T | undefined;
offset: number | undefined;
};
Expand All @@ -1032,7 +1018,7 @@ export class MergeTree {
// (undocumented)
getMarkerFromId(id: string): ISegment | undefined;
// (undocumented)
getPosition(node: MergeNode, refSeq: number, clientId: number): number;
getPosition(node: MergeNode, refSeq: number, clientId: number, localSeq?: number): number;
_getSlideToSegment(segment: ISegment | undefined): ISegment | undefined;
// @deprecated (undocumented)
getStackContext(startPos: number, clientId: number, rangeLabels: string[]): RangeStackMap;
Expand All @@ -1045,8 +1031,7 @@ export class MergeTree {
// (undocumented)
insertSegments(pos: number, segments: ISegment[], refSeq: number, clientId: number, seq: number, opArgs: IMergeTreeDeltaOpArgs | undefined): void;
get length(): number;
// (undocumented)
localNetLength(segment: ISegment): number;
localNetLength(segment: ISegment, refSeq?: number, localSeq?: number): number;
// (undocumented)
map<TClientData>(actions: SegmentActions<TClientData>, refSeq: number, clientId: number, accum: TClientData): void;
// (undocumented)
Expand Down Expand Up @@ -1077,6 +1062,7 @@ export class MergeTree {
// (undocumented)
removeLocalReferencePosition(lref: LocalReferencePosition): LocalReferencePosition | undefined;
resolveRemoteClientPosition(remoteClientPosition: number, remoteClientRefSeq: number, remoteClientId: number): number | undefined;
rollback(op: IMergeTreeDeltaOp, localOpMetadata: SegmentGroup): void;
// (undocumented)
root: IMergeBlock;
// (undocumented)
Expand Down Expand Up @@ -1441,6 +1427,8 @@ export interface SegmentGroup {
// (undocumented)
previousProps?: PropertySet[];
// (undocumented)
removedReferences?: LocalReferencePosition[];
// (undocumented)
segments: ISegment[];
}

Expand Down
Loading

0 comments on commit d7fad08

Please sign in to comment.