Skip to content
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

Remove deprecated Merge-Tree and SharedString ISegment members #23448

Merged
merged 40 commits into from
Jan 7, 2025

Conversation

anthony-murphy
Copy link
Contributor

@anthony-murphy anthony-murphy commented Jan 3, 2025

The current ISegment interface over-exposes a number of properties which do not have an external use case, and any external usage could result in damage to the underlying merge-tree including data corruption.
In Fluid Framework release 2.12.0 these properties and associated types were deprecated.

The only use case that will continue to be supported is determining if a segment is removed. For this purpose we've added the free function segmentIsRemoved(segment: ISegment): boolean.

For example, checking if a segment is not removed would change as follows:

- if(segment.removedSeq === undefined){
+ if(!segmentIsRemoved(segment)){

The following properties are removed from ISegment and its implementations:

  • clientId
  • index
  • localMovedSeq
  • localRefs
  • localRemovedSeq
  • localSeq
  • movedClientsIds
  • movedSeq
  • movedSeqs
  • ordinal
  • removedClientIds
  • removedSeq
  • seq
  • wasMovedOnInsert

Additionally, the following types are also removed:

  • IMergeNodeCommon
  • IMoveInfo
  • IRemovalInfo
  • LocalReferenceCollection

fixes #23328

@github-actions github-actions bot added area: dds: sharedstring public api change Changes to a public API base: main PRs targeted against main branch labels Jan 3, 2025
Copy link
Collaborator

@msfluid-bot msfluid-bot left a comment

Choose a reason for hiding this comment

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

Code Coverage Summary

↓ packages.dds.sequence.src:
 Branch Coverage Change: -0.01%
Metric NameBaseline coveragePR coverageCoverage Diff
Branch Coverage 89.68% 89.67% ↓ -0.01%
↑ packages.dds.merge-tree.src:
 Branch Coverage Change: 0.04%
Metric NameBaseline coveragePR coverageCoverage Diff
Branch Coverage 94.81% 94.85% ↑ 0.04%

Baseline commit: 237f042
Baseline build: 315358
Happy Coding!!

Code coverage comparison check passed!!

@msfluid-bot
Copy link
Collaborator

msfluid-bot commented Jan 3, 2025

@fluid-example/bundle-size-tests: +237 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 470.55 KB 470.59 KB +35 Bytes
azureClient.js 567.29 KB 567.34 KB +49 Bytes
connectionState.js 724 Bytes 724 Bytes No change
containerRuntime.js 266.44 KB 266.46 KB +14 Bytes
fluidFramework.js 439.08 KB 439.09 KB +14 Bytes
loader.js 134.2 KB 134.21 KB +14 Bytes
map.js 42.68 KB 42.69 KB +7 Bytes
matrix.js 150.36 KB 150.36 KB -1 Bytes
odspClient.js 534.75 KB 534.8 KB +49 Bytes
odspDriver.js 99.49 KB 99.51 KB +21 Bytes
odspPrefetchSnapshot.js 43.05 KB 43.06 KB +14 Bytes
sharedString.js 166.51 KB 166.52 KB +7 Bytes
sharedTree.js 429.55 KB 429.56 KB +7 Bytes
Total Size 3.42 MB 3.42 MB +237 Bytes

Baseline commit: 237f042

Generated by 🚫 dangerJS against 31137f7

@anthony-murphy anthony-murphy force-pushed the test/remove-mt-segment-deprecations branch from cf8aebf to b023708 Compare January 3, 2025 22:52
@anthony-murphy anthony-murphy changed the title Test/remove mt segment deprecations Remove Merge-Tree and SharedString ISegment Deprecations Jan 6, 2025
@anthony-murphy anthony-murphy marked this pull request as ready for review January 6, 2025 21:47
@anthony-murphy anthony-murphy requested review from a team as code owners January 6, 2025 21:47
Copy link
Contributor

@Josmithr Josmithr left a comment

Choose a reason for hiding this comment

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

Left a very nitpicky suggestion, but otherwise the docs changes look good!

@anthony-murphy anthony-murphy enabled auto-merge (squash) January 7, 2025 00:09
@anthony-murphy anthony-murphy changed the title Remove Merge-Tree and SharedString ISegment Deprecations Remove deprecated Merge-Tree and SharedString ISegment members Jan 7, 2025
Copy link
Contributor

github-actions bot commented Jan 7, 2025

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> [email protected] ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> [email protected] serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> [email protected] check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  170492 links
    1603 destination URLs
    1838 URLs ignored
       0 warnings
       0 errors


@anthony-murphy anthony-murphy merged commit e98574f into main Jan 7, 2025
31 checks passed
@anthony-murphy anthony-murphy deleted the test/remove-mt-segment-deprecations branch January 7, 2025 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds: sharedstring area: dds Issues related to distributed data structures base: main PRs targeted against main branch changeset-present public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Merge-Tree and SharedString ISegment Deprecations
4 participants