-
Notifications
You must be signed in to change notification settings - Fork 548
Tweak and partially integrate ClientVersionDispatchingCodecBuilder #24760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Tweak and partially integrate ClientVersionDispatchingCodecBuilder #24760
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extends the versioned codec system with per-codec override support and wires it into the EditManager and SharedTree, enabling clients to request specific format versions.
- Introduces
CodecName
andFormatVersion
types and augmentsCodecWriteOptions
withwriteVersionOverrides
andallowPossiblyIncompatibleWriteVersionOverrides
. - Implements
ClientVersionDispatchingCodecBuilder
to replace prior dispatch utilities and integrates it intomakeEditManagerCodec
andSharedTreeCore
. - Updates default SharedTree options and tests to exercise the new override logic.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/framework/fluid-framework/api-report/fluid-framework.alpha.api.md | Adds CodecName , FormatVersion , and new options to public API docs |
packages/dds/tree/api-report/tree.alpha.api.md | Mirrors the new types and options in tree API docs |
packages/dds/tree/src/codec/index.ts | Exports CodecName , CodecVersion , and ClientVersionDispatchingCodecBuilder |
packages/dds/tree/src/codec/versioned/index.ts | Exports builder and CodecVersion type from versioned package |
packages/dds/tree/src/codec/versioned/codec.ts | Implements ClientVersionDispatchingCodecBuilder with override logic |
packages/dds/tree/src/shared-tree-core/editManagerCodecs.ts | Changes makeEditManagerCodec to return the new builder and registry |
packages/dds/tree/src/shared-tree-core/sharedTreeCore.ts | Uses builder.build with override options in SharedTreeCore |
packages/dds/tree/src/shared-tree/sharedTree.ts | Adds override fields to defaultSharedTreeOptions and per-version mappings |
packages/dds/tree/src/index.ts | Updates top-level exports for new types and FluidClientVersion |
packages/dds/tree/src/test/codec/versioned/codec.spec.ts | Updates versioned codec tests to use the new builder and override scenarios |
packages/dds/tree/src/test/shared-tree-core/edit-manager/editManagerCodecs.test.ts | Switches tests to the builder API and tests error/success for overrides |
packages/dds/tree/src/test/shared-tree-core/utils.ts | Imports FluidClientVersion in test utilities for formatVersion data |
Comments suppressed due to low confidence (1)
packages/dds/tree/src/shared-tree/sharedTree.ts:747
- Ensure that
SharedTreeOptionsInternal
(and its public counterpart) include the newwriteVersionOverrides
andallowPossiblyIncompatibleWriteVersionOverrides
fields, or consumers will see a type mismatch.
writeVersionOverrides: new Map(),
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
Description
Allow ClientVersionDispatchingCodecBuilder to support overrides to better align with the approach in #24422
Use ClientVersionDispatchingCodecBuilder for EditManager, though the ability to actually control its version via overrides and and fluid client version are not fully connected to the shared tree configuration (configuredSharedTree).
Reviewer Guidance
The review process is outlined on this wiki page.