Граф коммитов

503 Коммитов

Автор SHA1 Сообщение Дата
Jatin Garg 509d6a1887
Add changeset for removing the inbound and outbound queues on IDeltaManager (#23024)
## Description

Add chngeset for removing the inbound and outbound queues on
iDeltamanager. Refer to this PR for extra details:
https://github.com/microsoft/FluidFramework/pull/22282

---------

Co-authored-by: Jatin Garg <jatingarg@Jatins-MacBook-Pro-2.local>
Co-authored-by: Tyler Butler <tyler@tylerbutler.com>
2024-11-07 13:32:04 -08:00
Jason Hartman 365c5c0643
improvement(client-presence): move `PresenceStates` entries under `props` (#23021)
to allow arbitrary entry names and future PresenceStates methods
2024-11-07 12:28:28 -08:00
Jatin Garg 45a57693f2
Remove deprecated inbound and outbound queues on IDeltaManager (#22282)
## Description


[AB#7202](https://dev.azure.com/fluidframework/internal/_workitems/edit/7202)

1.) Remove deprecated inbound and outbound queues on IDeltaManager.
2.) Move them to IDeltaManagerFull so that internal Fluid layers can
still use it but not the apps.

---------

Co-authored-by: Jatin Garg <jatingarg@Jatins-MacBook-Pro-2.local>
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
Co-authored-by: Tyler Butler <tyler@tylerbutler.com>
2024-11-07 19:36:24 +00:00
Craig Macomber (Microsoft) 8d470085fb
feat: Add compareHandle (#22997)
## Description

Add API to compare IFluidHandles.

This reduces the need to inspect the internals of handles.
2024-11-07 10:12:53 -08:00
Tony Murphy 7a032533a6
Unsupported Merge-Tree Types and Exposures Removed (#22696)
As part of ongoing improvements, several exposed internals that are
unnecessary for any supported scenarios and could lead to errors if used
have been removed. Since direct usage would likely result in errors, it
is not expected that these changes will impact any Fluid Framework
consumers.

Removed types:
- IMergeTreeTextHelper
- MergeNode
- ObliterateInfo
- PropertiesManager
- PropertiesRollback
- SegmentGroup
- SegmentGroupCollection

In addition to removing the above types, their exposures have also been
removed from interfaces and their implementations: `ISegment`,
`ReferencePosition`, and `ISerializableInterval`.

Removed functions:
- addProperties
- ack

Removed properties:
- propertyManager
- segmentGroups

The initial deprecations of the now changed or removed types were
announced in Fluid Framework v2.2.0:
[Fluid Framework
v2.2.0](https://github.com/microsoft/FluidFramework/blob/main/RELEASE_NOTES/2.2.0.md)

---------

Co-authored-by: Tyler Butler <tylerbu@microsoft.com>
2024-11-06 18:51:22 -08:00
Kian Thompson aae7184de6
Update changeset from PR#22791 (#23015)
PR #22791 had auto-merge turned on, so a suggested change to the
changeset wasn't made.
https://github.com/microsoft/FluidFramework/pull/22791#discussion_r1831644500
2024-11-06 14:10:39 -08:00
Tyler Butler 0a2c31f1ed
build(client): Add release notes section for legacy API changes (#23003)
Since we'll be releasing a lot of legacy API changes and removals in
2.10, I think a dedicated section in the release notes will be useful.
Incidentally this is why the sections were designed to be configurable.
2024-11-06 20:44:22 +00:00
Mark Fields d252af539a
ContainerRuntime: Remove the contents property of batchBegin/batchEnd's "op" event arg (#22791)
## Description

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

ContainerRuntime's 'batchBegin'/'batchEnd' events: Removing the
`contents` property on event arg `op`

The 'batchBegin'/'batchEnd' events on ContainerRuntime indicate when a
batch is beginning/finishing being processed.
The `contents` property on there is not useful or relevant when
reasoning over incoming changes at the batch level.
So it has been removed from the `op` event arg.

## Breaking Changes

Yes this is a breaking change.  See changeset.

---------

Co-authored-by: Kian Thompson <102998837+kian-thompson@users.noreply.github.com>
2024-11-06 12:07:02 -08:00
Tony Murphy 2aa0b5e794
MergeTree `Client` Legacy API Removed (#22697)
The `Client` class in the merge-tree package has been removed.
Additionally, types that directly or indirectly expose the merge-tree
`Client` class have also been removed.

The removed types were not meant to be used directly, and direct usage
was not supported:

- AttributionPolicy
- IClientEvents
- IMergeTreeAttributionOptions
- SharedSegmentSequence
- SharedStringClass

Some classes that referenced the `Client` class have been transitioned
to interfaces. Direct instantiation of these classes was not supported
or necessary for any supported scenario, so the change to an interface
should not impact usage. This applies to the following types:

- SequenceInterval
- SequenceEvent
- SequenceDeltaEvent
- SequenceMaintenanceEvent

The initial deprecations of the now changed or removed types were
announced in Fluid Framework v2.4.0:
[Several MergeTree Client Legacy APIs are now
deprecated](https://github.com/microsoft/FluidFramework/blob/main/RELEASE_NOTES/2.4.0.md#several-mergetree-client-legacy-apis-are-now-deprecated-22629)

---------

Co-authored-by: Tyler Butler <tylerbu@microsoft.com>
2024-11-05 23:22:22 +00:00
Jenn e51c94da32
feat(tree): adds a `changed` event on `TreeBranchEvents` (#22977)
adds a new `changed` event to `TreeBranchEvents` that fires for both
local and remote changes

---------

Co-authored-by: Noah Encke <78610362+noencke@users.noreply.github.com>
2024-11-05 20:20:40 +00:00
Jatin Garg 54f2a18248
build(client): changelog generation for minor release 2.5.0 (#22976)
## Description

build(client): changelog generation for minor release 2.5.0

Co-authored-by: Jatin Garg <jatingarg@Jatins-MacBook-Pro-2.local>
2024-11-05 01:39:52 +00:00
Tyler Butler fd6ce8b425
build(client): Generate release notes for 2.5.0 release (#22965)
Generates the release notes for 2.5. Most changesets have been updated
with minor wording and formatting changes. Command used to generate the
release notes:

```shell
pnpm flub generate releaseNotes -g client -t minor --outFile RELEASE_NOTES/2.5.0.md
```

---------

Co-authored-by: jzaffiro <110866475+jzaffiro@users.noreply.github.com>
2024-11-05 00:35:21 +00:00
Jason Hartman 6096657620
fix(client-presence): ISessionClient naming consistency (#22973)
1. `ISessionClient` method names updated for consistency to
`getConnectionId()` and `getConnectionStatus()`.
2. Implementation of `ISessionClient` moved to a full class object.
3. Changeset provided for Presence changes since 2.4.
4. Updated `id` to `ID` in comments (public and most internal).

No behavior is changed.

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

---------

Co-authored-by: Willie Habimana <whabimana@microsoft.com>
Co-authored-by: Tyler Butler <tylerbu@microsoft.com>
2024-11-04 23:51:01 +00:00
Noah Encke 80ed0284f0
Add refreshed SharedTree alpha branching API (#22970)
## Description

This introduces a new SharedTree branching API that follows the ideas in
[this
document](https://github.com/microsoft/FluidFramework/pull/22740/files#diff-0073fb61eb0ca7c2b1f9bc918f31ed46270c5a104cee8b419dac1d82845167da).
Essentially, the branching API remains the same but has been exposed
directly on the view objects (rather than on a separate object) for the
user's convenience. The previous branching API's entry point is
deprecated.

See the changeset and new documentation for more details.
2024-11-04 14:52:03 -08:00
Craig Macomber (Microsoft) 18a23e8816
tree: Import / Export APIs and demo (#22566)
## Description

Added import/export options for tree content and schema, and example
script using them.
2024-11-01 21:15:10 +00:00
Craig Macomber (Microsoft) 176335ce88
Tree: allow explicit construction of array and map nodes with no arguments (#22946)
## Description

See changeset for details.
2024-10-31 20:10:25 +00:00
Craig Macomber (Microsoft) b669a6efdb
tree: `TreeNodeSchemaClass` now specifies its `TNode` as `TreeNode` (#22938)
## Description

This improves on #22763 to be slightly more specific in the case of
TreeNodeSchemaClass with an unspecified TNode parameter.
2024-10-30 13:40:59 -07:00
Craig Macomber (Microsoft) 645b9ed695
tree: handle schema contravariantly when generating input types (#22874)
## Description

Handle schema contravariantly when generating input types.

## Breaking Changes

No runtime changes, but typing tweaks could break users on non-exact
schema, and the enum schema APIs have been tweaked to avoid relying on
non-exact schema, see changeset.
2024-10-29 13:02:32 -07:00
Craig Macomber (Microsoft) a1b4cdd45e
Fix libCheck (#22923)
## Description

While neither of these compile errors are in the `@public` API surface,
they could impact customers using the public API due to how `libCheck`
works and how Fluid Framework handles it's API exports.

See changeset for details.

I have filed
https://dev.azure.com/fluidframework/internal/_workitems/edit/21856 to
internally track that this was not detected by the CI of FF or FF
examples.
2024-10-29 12:12:20 -07:00
Navin Agarwal 0b1ce2b38f
Op bunching 3: Bunch contiguous ops for DDS in a batch - DDS part (#22841)
## Reviewer guidance
This is part 3 or 3 of the op bunching feature. This part focuces on the
changes in the DDS. [Part
1](https://github.com/microsoft/FluidFramework/pull/22839) and [part
2](https://github.com/microsoft/FluidFramework/pull/22840).

## Problem
During op processing, container runtime sends ops one at a time to data
stores to DDSes. If a DDS has received M contiguous ops as part of a
batch, the DDS is called M times to process them individually. This has
performance implications for some DDSes and they would benefit from
receiving and processing these M ops together.

Take shared tree for example:
For each op received which has a sequenced commit, all the pending
commits are processed by the rebaser. So, as the number of ops received
grows, so does the processing of pending commits. The following example
describes this clearly:
Currently if a shared tree client has N pending commits which have yet
to be sequenced, each time that client receives a sequenced commit
authored by another client (an op), it will update each of its pending
commits which takes at least O(N) work.
Instead, if it receives M commits at once, it could do a single update
pass on each pending commit instead of M per pending commit.
It can compose the M commits together into a single change to update
over, so it can potentially go from something like O (N * M) work to O
(N + M) work with batching.

## Solution - op bunching
The solution implemented here is a feature called "op bunching".
With this feature, contiguous ops in a grouped op batch that belong to a
data store / DDS will be bunched and sent to it in an array - The
grouped op is sent as an `ISequencedMessageEnvelope` and the individual
message `contents` in it are sent as an array along with the
`clientSequenceNumber` and `localOpMetadata`.
The container runtime will send bunch of contiguous ops for each data
store to it. The data store will send bunch of contiguous ops for each
DDS to it. The DDS can choose how to process these ops. Shared tree for
instance, would compose the commits in all these ops and update pending
commits with it.
Bunching only contiguous ops for a data store / DDS in a batch preserves
the behavior of processing ops in the sequence it was received.

Couple of behavior changes to note:
1. Op events - An implication of this change is the timing of "op"
events emitted by container runtime and data store runtime will change.
Currently, these layers emit an "op" event immediately after an op is
processed. With this change, an upper layer will only know when a bunch
has been processed by a lower layer. So, it will emit "op" events for
individual ops in the bunch after the entire bunch is processed.
From my understanding, this should be fine because we do not provide any
guarantee that the "op" event will be emitted immediately after an op is
processed. These events will be emitted in order of op processing and
(sometime) after the op is processed.
Take delta manager / container runtime as an example. Delta manager
sends an op for processing to container runtime and emits the "op"
event. However, container runtime may choose to not process these ops
immediately but save them until an entire batch is received. This change
was made but was reverted due to some concerns not related to the topic
discussed here - https://github.com/microsoft/FluidFramework/pull/21785.
The chang here is similar to the above behavior where an upper layer
doesn't know and shouldn't care what lower layers do with ops.
2. `metadata` property on message - With this PR, the metadata property
is removed from a message before it's sent to data stores and DDS. This
is because we now send one common message (the grouped op) and an array
of contents. Individual messages within a grouped op have batch begin
and end metadata but they are just added by the runtime to keep it like
old batch messages. The data store and DDS don't care about it so
removing them should be fine.


[AB#20123](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/20123)
2024-10-29 11:18:41 -07:00
Navin Agarwal 2e5b969d3a
Op bunching 2: Bunch contiguous ops for data store in a batch - data store part (#22840)
## Reviewer guidance
This is part 2 or 3 of the op bunching feature. This part focuces on the
changes in data store. Part 1 - #22839

## Problem
During op processing, container runtime sends ops one at a time to data
stores to DDSes. If a DDS has received M contiguous ops as part of a
batch, the DDS is called M times to process them individually. This has
performance implications for some DDSes and they would benefit from
receiving and processing these M ops together.

Take shared tree for example:
For each op received which has a sequenced commit, all the pending
commits are processed by the rebaser. So, as the number of ops received
grows, so does the processing of pending commits. The following example
describes this clearly:
Currently if a shared tree client has N pending commits which have yet
to be sequenced, each time that client receives a sequenced commit
authored by another client (an op), it will update each of its pending
commits which takes at least O(N) work.
Instead, if it receives M commits at once, it could do a single update
pass on each pending commit instead of M per pending commit.
It can compose the M commits together into a single change to update
over, so it can potentially go from something like O (N * M) work to O
(N + M) work with batching.

## Solution - op bunching
The solution implemented here is a feature called "op bunching".
With this feature, contiguous ops in a grouped op batch that belong to a
data store / DDS will be bunched and sent to it in an array - The
grouped op is sent as an `ISequencedMessageEnvelope` and the individual
message `contents` in it are sent as an array along with the
`clientSequenceNumber` and `localOpMetadata`.
The container runtime will send bunch of contiguous ops for each data
store to it. The data store will send bunch of contiguous ops for each
DDS to it. The DDS can choose how to process these ops. Shared tree for
instance, would compose the commits in all these ops and update pending
commits with it.
Bunching only contiguous ops for a data store / DDS in a batch preserves
the behavior of processing ops in the sequence it was received.

Couple of behavior changes to note:
1. Op events - An implication of this change is the timing of "op"
events emitted by container runtime and data store runtime will change.
Currently, these layers emit an "op" event immediately after an op is
processed. With this change, an upper layer will only know when a bunch
has been processed by a lower layer. So, it will emit "op" events for
individual ops in the bunch after the entire bunch is processed.
From my understanding, this should be fine because we do not provide any
guarantee that the "op" event will be emitted immediately after an op is
processed. These events will be emitted in order of op processing and
(sometime) after the op is processed.
Take delta manager / container runtime as an example. Delta manager
sends an op for processing to container runtime and emits the "op"
event. However, container runtime may choose to not process these ops
immediately but save them until an entire batch is received. This change
was made but was reverted due to some concerns not related to the topic
discussed here - https://github.com/microsoft/FluidFramework/pull/21785.
The chang here is similar to the above behavior where an upper layer
doesn't know and shouldn't care what lower layers do with ops.
2. `metadata` property on message - With this PR, the metadata property
is removed from a message before it's sent to data stores and DDS. This
is because we now send one common message (the grouped op) and an array
of contents. Individual messages within a grouped op have batch begin
and end metadata but they are just added by the runtime to keep it like
old batch messages. The data store and DDS don't care about it so
removing them should be fine.


[AB#20123](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/20123)
2024-10-28 15:43:36 -07:00
Craig Macomber (Microsoft) 05197d6d3f
tree: Improve non-schema aware typing (#22763)
## Description

See changeset

## Breaking Changes

See changeset
2024-10-22 12:31:01 -07:00
Jason Hartman e6566f6358
fix(client): reformat signal telemetry details (#22804)
- use `details` for all elements
- SignalLatency: shorten names now that data is packed into details
- SignalLost/SignalOutOfOrder: rename `trackingSequenceNumber` to
`expectedSequenceNumber`
- SignalOutOfOrder: avoid logging `contents.type` for when there it is a
chance it could be customer content.
- update tests:
  - logger.assertMatch to use true inlineDetailsProp argument
  - explicit `reconnectCount` for SignalLatency
- explicit `expectedSequenceNumber` and
`clientBroadcastSignalSequenceNumber` for SignalLost
2024-10-18 23:58:18 +00:00
Tyler Butler b053eb67bd
build(client): Generate changelogs for 2.4 release (#22798) 2024-10-14 19:38:11 -07:00
Tyler Butler a06e3c19b5
build(client): Generate release notes for 2.4.0 (#22785)
Generated release notes for the 2.4 release. The notes were generated using the following command:

```shell
flub generate releaseNotes -g client -t minor --outFile RELEASE_NOTES/2.4.0.md
```
2024-10-14 10:38:34 -07:00
Mark Fields de6928b528
Stop parsing op contents in DeltaManager - runtime will do it (#22750)
A long time ago (5acfef448f) we added
support in ContaineRuntime to parse op contents if it's a string. The
intention was to stop parsing in DeltaManager once that saturated. This
is that long overdue follow-up.

Taking this opportunity to make a few things hopefully clearer in
ContainerRuntime too:

* Highlighting where/how the serialization/deserialization of `contents`
happens
* Highlighting the different treatment/expectations for runtime v.
non-runtime messages during `process` flow

## Deprecations:

Deprecating use of `contents` on the event arg `op` for
`batchBegin`/`batchEnd` events, they're in for a surprise. I added a
changeset for this case.
2024-10-11 23:01:59 +00:00
Craig Macomber (Microsoft) 6a75bd0616
tree: Cleanup object property tests, and fix bug (#22748)
## Description

This cleans up a section of the object node tests which used schema
types in a complicated generic way that's fragile and hard to work with.

When rewriting these tests, I focused the new ones on testing aspects
that actually have special logic and are likely to break instead of just
different value types. Thus the tests now cover the odd normalization
cases of numbers.

These tests found a couple of issues:
- unhydrated node handling of null was incorrect (see changeset)
- Some type errors were thrown for invalid user input. TO help keep it
easy to tell which errors are our bugs and which are app bugs I've made
these fluid usage errors.
- A needless check for NaN was included where the check for isFinaite
would handle it correctly (Number.isFinite considers NaNs to not be
finite: comment already calls out NaN and it has test coverage so this
seems like a safe change.)
2024-10-08 17:58:09 +00:00
Craig Macomber (Microsoft) 920a65f66e
Tree: Add Schema export and compare APIs (#22733)
## Description

See changeset for details.

A realistic detailed usage example can be found in
https://github.com/microsoft/FluidFramework/pull/22566/files#diff-b893cfcd2daa74fb9dd1a8b2ce47006faaaefcb7b83671f1413f63faf65257af
showing how an actual app may use these APIs. Assuming this lands before
the next release, the changeset could get a proper link to that code on
main added as an example.
2024-10-04 23:44:42 +00:00
Craig Macomber (Microsoft) 5f9bbe011a
tree: Promote schemaCreationUtilities to alpha (#20035)
## Description

Promote schemaCreationUtilities to alpha, and a bit of polish for their
API and docs.
2024-10-03 22:36:04 +00:00
Craig Macomber (Microsoft) 40d3648ddf
tree: Add alpha tree configuration APIs (#22701)
## Description

See changeset for details.

Based on changes from
https://github.com/microsoft/FluidFramework/pull/22566
2024-10-03 13:09:02 -07:00
Craig Macomber (Microsoft) 6a2b68103c
Optimize anchorset and flex tree traversal (#22717)
## Description

Optimizations based on a profile of BubbleBench.

This resulted in about 5% more bubbles (80 vs 76).

Given this application's read costs scale with bubbles squared (for the
collision logic), contains writes, and most reads are leaf values which
are not impacted by this, this seems like a pretty good win. Some real
apps could probably show significantly larger gains if they are less
leaf heavy or less write heavy.
2024-10-03 11:35:22 -07:00
Noah Encke d1eade6547
Emit events from Unhydrated SharedTree Nodes (#22661)
## Description

Currently, unhydrated nodes can be edited but they do not emit any
change events. This PR fixes that by properly emitting events. Changes
include:

* Removing the `anchor` parameter from the relevant events on
`AnchorEvents`. This allows those events to be implemented by things
that don't have anchors (like `UnhydratedFlexTreeNode`) and things that
only sometimes have anchors (like `TreeNodeKernel`). Nobody uses that
parameter currently anyway because it is redundant (it's the same as the
object that the event is being registered on).
* Emitting a change event from `UnhydratedFlexTreeNode` when one of its
fields is edited. This is listened to by the `TreeNodeKernel`, which can
then emit its own corresponding event.
* Adding distinct types for the "unhydrated" and "hydrated" versions of
the state in `TreeNodeKernel`. This makes it more obvious what the state
transition is, and makes the type checking and safety more explicit.
* Adding a `lazy` function helper to better encapsulate the lazy-getting
of the events in TreeNodeKernel.
2024-09-27 19:51:35 -07:00
Tony Murphy 0b59ae89e0
Further MergeTree Client Legacy Deprecations (#22629)
In an effort the reduce exposure of the Client class in the merge-tree
package this change additionally deprecates a number of types which
either directly or indirectly expose the merge-tree Client class.

Most of these types are not meant to be used directly, and direct use is
not supported:
 - AttributionPolicy
 - IClientEvents
 - IMergeTreeAttributionOptions
 - SharedSegmentSequence
 - SharedStringClass

Some of the deprecations are for class constructors and in those cases
we plan to replace the class with an interface which has an equivalent
API. Direct instantiation of these classes is not currently supported or
necessary for any supported scenario, so the change to an interface
should not impact usage:
- SequenceInterval
- SequenceEvent
- SequenceDeltaEvent
- SequenceMaintenanceEvent

---------

Co-authored-by: jzaffiro <110866475+jzaffiro@users.noreply.github.com>
Co-authored-by: Tyler Butler <tyler@tylerbutler.com>
2024-09-27 10:31:40 -07:00
Noah Encke c168c6f821
Generate revertibles for commits incoming from a merge (#22644)
## Description

This corrects some behavior in the (currently alpha) branching APIs.
Currently, merging one or more commits into a target branch from a
source branch does not generate revertibles on the target branch. This
PR updates it so that each merge commit fires a "commitApplied" event
and generates the proper revertible.
2024-09-26 14:49:05 -07:00
Craig Macomber (Microsoft) 8be73d374d
tree: Replace RestrictiveReadonlyRecord with RestrictiveStringRecord (#22479)
## Description

Deprecate and replace RestrictiveReadonlyRecord, see changeset for
details.
2024-09-23 20:12:05 +00:00
Craig Macomber (Microsoft) b3f91ae91c
tree Fix structurally named map and array creation (#22522)
## Description

See changeset for details.
2024-09-23 12:24:25 -07:00
Noah Encke 8f4587c912
Branching APIs (#22550)
## Description

This exposes the branching APIs on the SharedTree checkout objects as
alpha APIs.

See the changeset for more details.
2024-09-18 16:35:17 -07:00
Joshua Smithrud 1d9f4c97ed
refactor(tree): Make properties of `FieldSchemaMetadata` readonly (#22564)
Follow-up to PR #22538. These properties were not intended to be
mutable. While this change is technically breaking, the previous PR was
made after the `2.3` release was cut, so this change is safe to make
prior to `2.4`.

Also adds a changeset for the new functionality, which was also missed
in the previous PR.
2024-09-18 21:00:24 +00:00
Taylor Williams 2aa29d9a13
tree: Expose the view schema on TreeView (#22547)
## Description

This PR exposes the view schema as a property on TreeView.
2024-09-17 19:07:44 +00:00
Craig Macomber (Microsoft) 5dd8c21a2c
Generate ChangeLogs for client 2.3 (#22527)
## Description

Generate ChangeLogs for client 2.3.

I had to manually remove the package references from the changeset from
the propertyDDS package removal to avoid
https://github.com/changesets/changesets/issues/1403 before generating
these.

Generated using: 
```
pnpm flub generate changelog -g client
```

Release notes will be generated by going to the commit before this
merged, and reprocessing the changesets.
2024-09-16 13:11:31 -07:00
Jason Hartman 42b323cdbf
build(client): publish experimental presence (#22499)
+ Note current Notifications limitation
+ Connect docs to readme with more details
2024-09-16 11:47:41 -07:00
Mark Fields 709f085c58
ContainerRuntime: Process incoming batches op-by-op instead of waiting for the whole batch (#22508)
We are concerned that holding batch messages in ContainerRuntime even
while DeltaManager advances its tracked sequence numbers through the
batch could have unintended consequences. So this PR restores the old
behavior of processing each message in a batch one-by-one, rather than
holding until the whole batch arrives.

Note that there's no change in behavior here for Grouped Batches.

### How the change works

PR #21785 switched the RemoteMessageProcessor from returning ungrouped
batch ops as they arrived, to holding them and finally returning the
whole batch once the last arrived. The downstream code was also updated
to take whole batches, whereas before it would take individual messages
and use the batch metadata to detect batch start/end.

Too many other changes were made after that PR to straight revert it.
Logic was added throughout CR and PSM that looks at info about that
batch which is found on the first message in the batch. So we can
reverse the change and process one-at-a-time, but we need a way to carry
around that "batch start info" with the first message in the batch.

So we are now modeling the result that RMP yields as one of three cases:

- A full batch of messages (could be from a single-message batch or a
Grouped Batch)
- The first message of a multi-message batch
- The next message in a multi-message batch

The first two cases include the "batch start info" needed for the recent
Offline work. The third case just indicates whether it's the last
message or not.

#22501 added some of the necessary structure, introducing the type for
"batch start info" and updating the downstream code to use that instead
of reading it off the old "Inbound Batch" type. This PR now adds those
other two cases to the RMP return type and handles processing them
throughout CR and PSM.
2024-09-16 10:50:18 -07:00
Tyler Butler c65c0657e8
Add deleted packages to changeset (#22507)
This is a workaround for a bug in the release notes generator - it
excludes changesets that apply to no packages.

The extra metadata will need to be deleted before generating changelogs.
If this is not done, generate changelog will fail with an error like:

```
Error: Command failed with exit code 1: pnpm exec changeset version
    🦋  error TypeError: Cannot destructure property 'packageJson' of 'undefined' as it is undefined.
    🦋  error     at Object.shouldSkipPackage 
    (/home/tylerbu/code/FluidFramework/node_modules/.pnpm/@changesets+should-skip-package@0.1.1/node_modules/@changesets/should-skip-package/dist/changesets-should-skip-package.cjs.js:6:3)
    🦋  error     at getRelevantChangesets 
    (/home/tylerbu/code/FluidFramework/node_modules/.pnpm/@changesets+assemble-release-plan@6.0.4/node_modules/@changesets/assemble-release-plan/dist/changesets-assemble-release-plan.cjs.js:608:29)
    🦋  error     at Object.assembleReleasePlan [as default] 
    (/home/tylerbu/code/FluidFramework/node_modules/.pnpm/@changesets+assemble-release-plan@6.0.4/node_modules/@changesets/assemble-release-plan/dist/changesets-assemble-release-plan.cjs.js:536:30)
    🦋  error     at version (/home/tylerbu/code/FluidFramework/node_modules/.pnpm/@changesets+cli@2.27.8/node_modules/@changesets/cli/dist/changesets-cli.cjs.js:1281:60)
    🦋  error     at async run (/home/tylerbu/code/FluidFramework/node_modules/.pnpm/@changesets+cli@2.27.8/node_modules/@changesets/cli/dist/changesets-cli.cjs.js:1463:11)
```
2024-09-13 13:15:12 -07:00
Craig Macomber (Microsoft) e64c6a1822
Move changeset "Make SharedTree usable with legacy APIs" into "section": "tree" (#22505)
## Description

Move changeset "Make SharedTree usable with legacy APIs" into "section":
"tree"

It is more of a feature than a bug fix (the fact this feature was
missing was more accidental than planned, but still seems more tree than
bug)
2024-09-13 12:18:04 -07:00
Craig Macomber (Microsoft) 12242cfdb5
Make tree alpha APIs actually usable (#22483)
## Description

`@fluidframework/tree` and `fluid-framework` now have a `/alpha` import
path where their `@alpha` APIs are exported.
2024-09-12 16:44:53 -07:00
Craig Macomber (Microsoft) c51f55c01a
Add /beta entry point to fluid-framework (#22469)
## Description

Add /beta entry point to fluid-framework with tree's beta items
2024-09-12 09:41:24 -07:00
Craig Macomber (Microsoft) 25d815f801
Fixup some changesets (#22467)
## Description

Fix a couple changesets based on
https://github.com/microsoft/FluidFramework/issues/22101
2024-09-11 02:19:38 +00:00
Craig Macomber (Microsoft) 4df56a2d71
Edit changeset (#22459)
## Description

Apply edits to changeset based on those missed in
https://github.com/microsoft/FluidFramework/pull/22453
2024-09-10 10:22:20 -07:00
Craig Macomber (Microsoft) 27faa56f5a
tree: Implicitly constructed object nodes now only consider own properties during validation (#22453)
## Description

See changeset for details.
2024-09-09 20:02:51 -07:00
Abram Sanderson bbdf869b8a
Add /legacy entrypoint for @fluidframework/tree (#22320)
## Description

#22272 intended to expose a `SharedTree` constant usable with the legacy
API (registry-based channel factories, data objects, etc). However,
`@fluidframework/tree` had no `@fluidframework/tree/legacy` nor a
`@fluidframework/tree/alpha` export, so the exposed API was not actually
usable. This rectifies that and makes `SharedTree` usable with the rest
of the legacy API (e.g. with `@fluidframework/aqueduct`).

---------

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-09-05 19:49:55 +00:00