FluidFramework
FluidFramework copied to clipboard
[Summarization] Refactor summary in progress validation during summarize
This is a pre-cursor to https://github.com/microsoft/FluidFramework/pull/21186 which removes trackState.
In SummarizerNode::summarize, removed the validation that a summary in progress. This validation exists to ensure that startSummary was called before summarize so that we can track state for incremental summaries.
However, this may not be the case in tests where ContainerRuntime::summarize is called directly. Currently, these tests set trackState to false to indicate that it is just interested in the summary tree without the tracking for incremental summary. The same can be achieved by setting fullTree to true and we can remove the redundant trackState option.
The scenario where this validation is still useful is when fullTree is true in the regular summarization flow via ContainerRuntime::submitSummary. In this scenario, the validation will still happen in SummarizerNode::validateSummary for single-commit summaries and in SummarizerNode::completeSummary for two-commit summaries. Added unit tests to validate this.
⯆ @fluid-example/bundle-size-tests: -292 Bytes
| Metric Name | Baseline Size | Compare Size | Size Diff |
|---|---|---|---|
| aqueduct.js | 453.27 KB | 453.2 KB | ⯆ -73 Bytes |
| azureClient.js | 552.46 KB | 552.39 KB | ⯆ -73 Bytes |
| connectionState.js | 680 Bytes | 680 Bytes | ■ No change |
| containerRuntime.js | 256.95 KB | 256.88 KB | ⯆ -73 Bytes |
| fluidFramework.js | 357.8 KB | 357.8 KB | ■ No change |
| loader.js | 134.34 KB | 134.34 KB | ■ No change |
| map.js | 41.53 KB | 41.53 KB | ■ No change |
| matrix.js | 143.75 KB | 143.75 KB | ■ No change |
| odspClient.js | 520.83 KB | 520.76 KB | ⯆ -73 Bytes |
| odspDriver.js | 97.3 KB | 97.3 KB | ■ No change |
| odspPrefetchSnapshot.js | 42.16 KB | 42.16 KB | ■ No change |
| sharedString.js | 160.27 KB | 160.27 KB | ■ No change |
| sharedTree.js | 357.78 KB | 357.78 KB | ■ No change |
| Total Size | 3.19 MB | 3.19 MB | ⯆ -292 Bytes |
Baseline commit: acd340733e4f8c8ac41a9e8b383eb2e134cd7bf5
Generated by :no_entry_sign: dangerJS against f6264eb8f6daaacf6d423d577289ccbf65276197