Skip to content

Remove direct use of TreeFactory and SharedTree class #24377

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

Merged
merged 2 commits into from
Apr 16, 2025

Conversation

CraigMacomber
Copy link
Contributor

Description

The SharedTree class only exists to wrap SharedTreeKernel up in a ISharedObject for use with Fluid's factories and runtimes.

Thus stop using the class and factory directly so that how this adaption of the kernel into a SharedObjectKind is done is no longer implicitly depended on my tests.

This enables the refactor in show this is done from #23729 to not be nearly as disruptive.

Reviewer Guidance

The review process is outlined on this wiki page.

@Copilot Copilot AI review requested due to automatic review settings April 15, 2025 23:18
@CraigMacomber CraigMacomber requested a review from a team as a code owner April 15, 2025 23:18
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: tree base: main PRs targeted against main branch labels Apr 15, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (3)

packages/dds/tree/src/treeFactory.ts:174

  • [nitpick] Consider verifying the intended accessibility of TreeFactory. If it's not meant to be used externally, ensure its visibility is appropriately restricted.
class TreeFactory implements IChannelFactory<ISharedTree> {

packages/dds/tree/src/test/utils.ts:260

  • Double-check that changing the factory type from ISharedTree to ITree does not affect tests that expect features specific to ISharedTree.
factory: IChannelFactory<ITree> = DefaultTestSharedTreeKind.getFactory(),

packages/dds/tree/src/test/snapshots/snapshotTestScenarios.ts:253

  • Verify that the new factory instantiation pattern via configuredSharedTree creates trees with the expected initial state for snapshot testing scenarios.
const provider = new TestTreeProviderLite(1, configuredSharedTree(options).getFactory(), true);

/**
* Shared object wrapping {@link SharedTreeKernel}.
*/
class SharedTreeImpl extends SharedObject implements ISharedTree {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved unchanged, except for new name (to not collide with SharedTree export in this file) and no longer file exported.

@CraigMacomber CraigMacomber merged commit 0230861 into microsoft:main Apr 16, 2025
35 checks passed
@CraigMacomber CraigMacomber deleted the NoTreeFactory branch April 16, 2025 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds: tree area: dds Issues related to distributed data structures base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants