getSnapshotTree is required on IChannelStorageService#25707
getSnapshotTree is required on IChannelStorageService#25707agarwal-navin merged 8 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR makes getSnapshotTree a required method on IChannelStorageService and updates implementations and type validation accordingly.
- Changes IChannelStorageService signature from optional to required and propagates usage (removes optional chaining).
- Adds createSnapshotTreeFromContents utility with accompanying tests.
- Updates type validation metadata and removes LocalChannelStorageService (and its tests) which did not implement the new required API.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/runtime/datastore-definitions/src/channel.ts | Makes getSnapshotTree required in the interface. |
| packages/dds/tree/src/shared-tree-core/sharedTreeCore.ts | Adjusts call site to required method (drops optional chaining). |
| packages/runtime/runtime-utils/src/objectstoragepartition.ts | Implements required getSnapshotTree passthrough. |
| packages/runtime/test-runtime-utils/src/mocks.ts | Adds snapshot tree creation & implements getSnapshotTree in mock storage. |
| packages/runtime/test-runtime-utils/src/test/mocks.spec.ts | Adds tests for createSnapshotTreeFromContents. |
| packages/runtime/datastore-definitions/src/test/types/validateDatastoreDefinitionsPrevious.generated.ts | Marks expected type validation breaks. |
| packages/runtime/test-runtime-utils/src/test/types/validateTestRuntimeUtilsPrevious.generated.ts | Marks expected type validation breaks. |
| packages/runtime/datastore-definitions/package.json | Adds broken forward compatibility entries. |
| packages/runtime/test-runtime-utils/package.json | Adds broken forward compatibility entries. |
| packages/runtime/test-runtime-utils/api-report/test-runtime-utils.legacy.beta.api.md | API report updated with required method (undocumented). |
| packages/runtime/datastore-definitions/api-report/datastore-definitions.legacy.beta.api.md | API report reflects required method. |
| packages/runtime/datastore/src/localChannelStorageService.ts | Removes implementation that lacked required method. |
| packages/runtime/datastore/src/test/localChannelStorageService.spec.ts | Removes tests for removed implementation. |
| .changeset/heavy-mails-pay.md | Records breaking change release notes. |
jason-ha
left a comment
There was a problem hiding this comment.
Approved with suggestion for changeset update to point to the issue.
There was a problem hiding this comment.
Appears to be required dead code removal (as opposed to fixing to conform to new requirements), right?
There was a problem hiding this comment.
Moved this to a separate PR. This one now only contains breaking changes.
|
🔗 Found some broken links! 💔 Run a link check locally to find them. See linkcheck output |
## Description The property `getSnapshotTree` is now required on `IChannelStorageService`. ## Breaking Changes This is a breaking change. This API was added and the upcoming break was announced in release 2.51.0 [here](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.51.0#user-content-new-getsnapshottree-api-on-ichannelstorageservice-24970).
Description
The property
getSnapshotTreeis now required onIChannelStorageService.Breaking Changes
This is a breaking change. This API was added and the upcoming break was announced in release 2.51.0 here.