-
Notifications
You must be signed in to change notification settings - Fork 548
fix(handles): Prepare for removal of IFluidHandleInternal.bind #24863
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?
Conversation
It will be removed from FluidObjectHandle when bind is removed from the interface
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 removes deprecated usages of IFluidHandleInternal.bind by eliminating legacy binding calls in tests and refactoring the attachment logic in Fluid handle implementations. Key changes include:
- Updating end-to-end tests in attachRegisterLocalApiTests.spec.ts to replace bind calls with attachGraph.
- Adding legacy flow comments in FluidObjectHandle to clarify the temporary binding logic.
- Refactoring SharedObjectHandle to incorporate a pending handles mechanism and new attachGraph logic.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/test/test-end-to-end-tests/src/test/attachRegisterLocalApiTests.spec.ts | Removed deprecated bind calls and updated variable naming via destructuring for clarity |
packages/runtime/datastore/src/fluidHandle.ts | Added inline comments to mark the legacy bind/attach flow |
packages/dds/shared-object-base/src/handle.ts | Refactored attachment logic with new isVisible getter, pendingHandles mechanism, and updated bind method |
Comments suppressed due to low confidence (2)
packages/test/test-end-to-end-tests/src/test/attachRegisterLocalApiTests.spec.ts:539
- [nitpick] The renaming from 'peerDataStore' to 'dataStore2' improves readability. Please ensure the same naming convention is consistently applied across other similar tests.
const { peerDataStore: dataStore2 } = await createPeerDataStore(
packages/dds/shared-object-base/src/handle.ts:104
- [nitpick] Consider adding more detail to the comment or documentation for the 'isVisible' getter to clarify its intended behavior in various attachment scenarios.
if (this.isVisible) {
|
||
// Flow of attachment: |
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.
These tests are strange as in they use internal constructs like bind
and attachGraph
in an end-to-end test which isn't what an application would do.
I would consider removing these tests or at least not doing this via internal functions. For instance, instead of calling attachGraph()
here, dataStore2's handle can be stored in the defaultDataStore's DDS.
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.
Doesn't have to be in this PR of course. But these tests don't seem valuable to me.
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.
Yeah they're totally weird! And some of it was just wrong, at least in comments. The changes here were just to remove the spurious bind
calls and some minor clean ups I made while trying to follow along.
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.
Agreed. I will create a work item to delete / update them.
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.
Looks good. I left a comment on removing or updating the tests that used bind.
Waiting to merge until I get a clean run of the partner integration pipeline for |
Description
This function was deprecated in #24553 and its removal is tracked by #24557.
This PR addresses these last two usages:
FluidObjectHandle.bind
implementation, which included tracking pending handles and such. Copied this up toSharedObjectHandle
where it belongs. All that logic will be removed fromFluidObjectHandle
whenbind
is removed.bind
function. (right now this is a no-op since all handles have abind
function, but once those are removed this still needs to work)