Skip to content

Align detached data format with attached pending data#18829

Merged
dannimad merged 30 commits into
microsoft:mainfrom
dannimad:cleandetachedformat
Jan 4, 2024
Merged

Align detached data format with attached pending data#18829
dannimad merged 30 commits into
microsoft:mainfrom
dannimad:cleandetachedformat

Conversation

@dannimad
Copy link
Copy Markdown
Contributor

@dannimad dannimad commented Dec 14, 2023

Current serialize API returns a stringified ISummaryTree. In order to consume it, rehydration receives that summary and converts it into an ISnapshotWithBlobContents. This change can be summarized as moving that summary -> snapshot conversion at serialization time. Such a conversion was not exactly equal to current one in order to provide a format similar to IPendingContainerState (ISnapshotTree and ISerializableBlobContents instead of ISnapshotWithBlobContents).

Backward compatible.

@github-actions github-actions Bot added base: main PRs targeted against main branch area: loader Loader related issues area: tests Tests to add, test infrastructure improvements, etc public api change Changes to a public API labels Dec 14, 2023
Comment thread packages/loader/container-loader/src/container.ts Outdated
@msfluid-bot
Copy link
Copy Markdown
Collaborator

msfluid-bot commented Dec 19, 2023

@fluid-example/bundle-size-tests: +124 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 741.29 KB 741.32 KB +33 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 540.26 KB 540.27 KB +11 Bytes
loader.js 166.8 KB 166.76 KB -41 Bytes
map.js 558.8 KB 558.82 KB +22 Bytes
matrix.js 657.03 KB 657.05 KB +22 Bytes
odspDriver.js 90.24 KB 90.26 KB +22 Bytes
odspPrefetchSnapshot.js 41.82 KB 41.83 KB +11 Bytes
sharedString.js 675.75 KB 675.78 KB +22 Bytes
sharedTree.js 790.33 KB 790.34 KB +11 Bytes
Total Size 4.28 MB 4.28 MB +124 Bytes

Baseline commit: 2ab624d

Generated by 🚫 dangerJS against 205d50b

Comment thread packages/loader/driver-utils/api-report/driver-utils.api.md
@dannimad dannimad marked this pull request as ready for review December 20, 2023 18:51
@dannimad dannimad requested review from a team as code owners December 20, 2023 18:51
@dannimad
Copy link
Copy Markdown
Contributor Author

I believe there are some tests we could add to serialized.spec.ts but not sure how the files inside are being generated.

Comment thread packages/loader/container-loader/src/container.ts Outdated
Comment thread packages/loader/container-loader/src/container.ts
Comment thread packages/loader/container-loader/src/container.ts Outdated
Comment thread packages/loader/container-loader/src/containerStorageAdapter.ts Outdated
Comment thread packages/loader/container-loader/src/container.ts Outdated
Comment thread packages/loader/container-loader/src/utils.ts Outdated
Comment thread packages/loader/container-loader/src/utils.ts Outdated
Comment thread packages/loader/container-loader/src/container.ts Outdated
@dannimad
Copy link
Copy Markdown
Contributor Author

dannimad commented Jan 3, 2024

I'll merge new serialized container format test for serialized.spec.ts in a subsequent PR.

@anthony-murphy anthony-murphy added the changeset-required PR requires a changeset label Jan 3, 2024
@github-actions github-actions Bot removed the changeset-required PR requires a changeset label Jan 3, 2024
@dannimad dannimad requested a review from a team as a code owner January 3, 2024 22:17
@dannimad dannimad merged commit a10cfd5 into microsoft:main Jan 4, 2024
@dannimad dannimad deleted the cleandetachedformat branch January 4, 2024 19:18
dannimad added a commit that referenced this pull request Jan 30, 2024
New try to test new detached format added in testdata repo. See
#18829 for more info
alexvy86 pushed a commit to alexvy86/FluidFramework that referenced this pull request Feb 13, 2024
New try to test new detached format added in testdata repo. See
microsoft#18829 for more info
anthony-murphy added a commit that referenced this pull request Mar 1, 2024
…19893)

## Background
This change is the final change for allowing consumers of fluid to call
serialize on a container while a container is in an attaching state,
which will include a failed attach where the failure didn't cause the
container to close. This will aid in the case of offline, network, or
server outage by allowing the application to capture the un-attached
state of the container, preserve it locally, and later create a new file
from it.


[AB#5502](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/5502)

## Overview
This change enables calling container.serialize while a container is in
the attaching state. It is the culmination of many smaller changes that
have gone in to enable this change.
- #18829
- #19400
 - #19246
 - #19517
 - #19518
 - #19590
 - #19634
 - #19802

---------

Co-authored-by: Tony Murphy <anthonm@microsoft.com>
Co-authored-by: Daniel Madrid <105010181+dannimad@users.noreply.github.com>
Co-authored-by: jzaffiro <110866475+jzaffiro@users.noreply.github.com>
Co-authored-by: Matt Rakow <ChumpChief@users.noreply.github.com>
sonalideshpandemsft pushed a commit that referenced this pull request Apr 12, 2024
Current serialize API returns a stringified ISummaryTree. In order to
consume it, rehydration receives that summary and converts it into an
ISnapshotWithBlobContents. This change can be summarized as moving that
summary -> snapshot conversion at serialization time. Such a conversion
was not exactly equal to current one in order to provide a format
similar to IPendingContainerState (ISnapshotTree and
ISerializableBlobContents instead of ISnapshotWithBlobContents).

Backward compatible.
sonalideshpandemsft pushed a commit that referenced this pull request Apr 15, 2024
Current serialize API returns a stringified ISummaryTree. In order to
consume it, rehydration receives that summary and converts it into an
ISnapshotWithBlobContents. This change can be summarized as moving that
summary -> snapshot conversion at serialization time. Such a conversion
was not exactly equal to current one in order to provide a format
similar to IPendingContainerState (ISnapshotTree and
ISerializableBlobContents instead of ISnapshotWithBlobContents).

Backward compatible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: loader Loader related issues area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants