Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 0 additions & 89 deletions .changeset/angry-wings-battle.md

This file was deleted.

111 changes: 111 additions & 0 deletions RELEASE_NOTES/2.73.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<!-- THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -->

# Fluid Framework v2.73.0

## Contents

- [🌳 SharedTree DDS Changes](#-sharedtree-dds-changes)
- [Schema snapshot compatibility checker (#25861)](#schema-snapshot-compatibility-checker-25861)

## 🌳 SharedTree DDS Changes

### Schema snapshot compatibility checker ([#25861](https://github.com/microsoft/FluidFramework/issues/25861))

This change adds alpha APIs for creating snapshots of view schema and testing their compatibility for the purposes of schema migrations.

New APIs:

- `checkCompatibility` - Checks the compatibility of the view schema which created the document against the view schema being used to open it.
- `importCompatibilitySchemaSnapshot` - Parse a JSON representation of a tree schema into a concrete schema.
- `exportCompatibilitySchemaSnapshot` - Returns a JSON representation of the tree schema for snapshot compatibility checking.

#### Example: Current view schema vs. historical view schema

An application author is developing an app that has a schema for storing 2D Points. They wish to maintain backwards compatibility in future versions and avoid changing their view schema in a way that breaks this behavior. When introducing a new initial schema, they persists a snapshot using `exportCompatibilitySchemaSnapshot`:

```ts
const factory = new SchemaFactory("test");

// The past view schema, for the purposes of illustration. This wouldn't normally appear as a concrete schema in the test
// checking compatibility, but rather would be loaded from a snapshot.
class Point2D extends factory.object("Point", {
x: factory.number,
y: factory.number,
}) {}
const viewSchema = new TreeViewConfiguration({ schema: Point2D });
const encodedSchema = JSON.stringify(
exportCompatibilitySchemaSnapshot(viewSchema),
);
fs.writeFileSync("PointSchema.json", encodedSchema);
```

Next they create a regression test to ensure that the current view schema can read content written by the original view schema (`SchemaCompatibilityStatus.canUpgrade`). Initially `currentViewSchema === Point2D`:

```ts
const encodedSchema = JSON.parse(fs.readFileSync("PointSchema.json", "utf8"));
const oldViewSchema = importCompatibilitySchemaSnapshot(encodedSchema);

// Check to see if the document created by the historical view schema can be opened with the current view schema
const compatibilityStatus = checkCompatibility(
oldViewSchema,
currentViewSchema,
);

// Check to see if the document created by the historical view schema can be opened with the current view schema
const backwardsCompatibilityStatus = checkCompatibility(
oldViewSchema,
currentViewSchema,
);

// z is not present in Point2D, so the schema must be upgraded
assert.equal(backwardsCompatibilityStatus.canView, false);

// The schema can be upgraded to add the new optional field
assert.equal(backwardsCompatibilityStatus.canUpgrade, true);
```

Additionally, they a regression test to ensure that older view schemas can read content written by the current view schema (`SchemaCompatibilityStatus.canView`):

```ts
// Test what the old version of the application would do with a tree using the new schema:
const forwardsCompatibilityStatus = checkCompatibility(
currentViewSchema,
oldViewSchema,
);

// If the old schema set allowUnknownOptionalFields, this would be true, but since it did not,
// this assert will fail, detecting the forwards compatibility break:
// this means these two versions of the application cannot collaborate on content using these schema.
assert.equal(forwardsCompatibilityStatus.canView, true);
```

Later in the application development cycle, the application author decides they want to change their Point2D to a Point3D, adding an extra field:

```ts
// Build the current view schema
const schemaFactory = new SchemaFactory("test");
class Point3D extends schemaFactory.object("Point", {
x: factory.number,
y: factory.number,

// The current schema has a new optional field that was not present on Point2D
z: factory.optional(factory.number),
}) {}
```

The test first compatibility test will pass as the Point2D schema is upgradeable to a Point3D schema. However, the second compatibility test fill fail as an application using the Point2D view schema cannot collaborate on content authored using the Point3D schema.

#### Change details

Commit: [`e5be416`](https://github.com/microsoft/FluidFramework/commit/e5be4163210ef68b7f8a7c10502f4871c30ec9f3)

Affected packages:

- @fluidframework/tree
- fluid-framework

[⬆️ 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!
4 changes: 4 additions & 0 deletions azure/packages/azure-local-service/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluidframework/azure-local-service

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions azure/packages/azure-service-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluidframework/azure-service-utils

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/apps/ai-collab/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/ai-collab

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/apps/blobs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/blobs

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/apps/collaborative-textarea/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/collaborative-textarea

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/apps/contact-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/contact-collection

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/apps/data-object-grid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/data-object-grid

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/apps/presence-tracker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/presence-tracker

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/apps/staging/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/staging

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/apps/task-selection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/task-selection

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/apps/tree-cli-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/tree-cli-app

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/apps/tree-comparison/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/tree-comparison

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/benchmarks/bubblebench/baseline/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/bubblebench-baseline

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/benchmarks/bubblebench/common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/bubblebench-common

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/bubblebench-experimental-tree

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/benchmarks/bubblebench/ot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/bubblebench-ot

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/benchmarks/bubblebench/shared-tree/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/bubblebench-simple-tree

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-example/odspsnapshotfetch-perftestapp

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
4 changes: 4 additions & 0 deletions examples/benchmarks/tablebench/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fluid-internal/tablebench

## 2.73.0

Dependency updates only.

## 2.72.0

Dependency updates only.
Expand Down
Loading
Loading