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

21374 Коммитов

Автор SHA1 Сообщение Дата
Jatin Garg 00e239a548
Fix race condition while establishing connection due to multiplexing in ODSP Driver. (#23085)
## Breaking Changes


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

Following up on this PR:
https://github.com/microsoft/FluidFramework/pull/23078 which we reverted
due to assert 0x245 due to the original change. The assert was caused
due to registering "disconnect" listener before the initialization.
In this change, I removed registering a listener as we already have
disconnectCore which is triggered on disconnection. So using that for
rejecting the promise.

---------

Co-authored-by: Jatin Garg <jatingarg@Jatins-MacBook-Pro-2.local>
Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
2024-11-15 11:38:04 -08:00
Jason Hartman 88a2039547
fix(client): declare proper `IAudience` implementation (#23106)
by explicitly specifying `getSelf` return type. Also remove the
incorrect undefined `client` property.

Enable `exactOptionalPropertyTypes` and fix errors to keep `IAudience`
implementation strictly checked.
2024-11-15 10:12:20 -08:00
Alex Villarreal e539e00ca5
refactor: Make all pipelines use new agent pools in eastus2 (#23072)
## Description

We're moving our agent pools to the eastus2 region as part of a capacity
management initiative. This PR updates all pipelines to use the new
pools.
2024-11-15 10:16:13 -06:00
WillieHabi 325bc7c352
docs(client-presence): remove 'experimental package' usage in Presence docs (#23105)
## Description
Presence has been promoted to alpha and is not experimental package
anymore. This PR removes the 'experimental package' usage in Presence
docs
2024-11-14 23:22:04 -08:00
Jason Hartman 2b69913acd
docs(client-presence): changelog & changeset updates (#23030)
1. Setup changeset to be used for all `Presence` changes
2. Add notes for rename
3. Update CHANGELOG to reflect 2.50 release notes and [vague] 2.4.0
history
2024-11-15 07:20:12 +00:00
Jason Hartman 83ee76e51c
docs(client-presence): update `Notifications` limitations (#23100) 2024-11-14 21:55:43 -08:00
Joshua Smithrud 8a75fa9ab2
bump(devtools-browser-extension): 1.0.0 (#23102)
Bump devtools browser extension version to 1.0.0.
2024-11-15 02:39:02 +00:00
WillieHabi e6030446f8
promote(client-presence): promote to alpha (#23073)
## Description
Promote presence to alpha from experimental

---------

Co-authored-by: Jason Hartman <jasonha@microsoft.com>
2024-11-14 17:20:47 -08:00
Daniel Madrid 136a519cb9
Fix 0x6c8 assert hit (#23079)
This change fixes issue covered in PR
https://github.com/microsoft/FluidFramework/pull/22981
After several simplifications, I realized we could reuse
pendingStashedBlobs map to identify the bug scenario, which is
reuploading a stashed blob that was already processed. If while
onUploadResolve we don't see the blob in the pending list but it's on
the stashed one, then just ignore the new upload.
trackPendingStashedUploads is replaced with waitForStashedBlobs which
also implies there are further simplifications to the blob manager
logic, mainly we could also remove the stashedUpload property on the
PendingBlob type since now we keep track of stashed blobs separately .
2024-11-14 16:10:48 -08:00
Joshua Smithrud b054eb5a39
fix(devtools-view): Assign "button" role to selectable menu section headers. (#23093)
Accessibility bug fix.

Also refactors the code to be a bit more intentional about how the
section header behaves, and applies alt text to section headers that are
buttons.


[AB#4833](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/4833)
2024-11-14 23:38:02 +00:00
Joshua Smithrud d0c5af1b86
build(api-markdown-documenter): Bump package version for publishing (#23098)
Bumped for #23083
2024-11-14 23:15:59 +00:00
Craig Macomber (Microsoft) 662d7a5fe2
Update build-tools version used by client (#23097)
## Description

This used:

1. `pnpm exec flub bump deps client -g  -t latest`
2. Manually update version in root package.json
3. pnpm install --no-frozen-lockfile
4. Remove no longer needed type test breaks from tree (this update had
some fixes to handling of never and system types in type tests)
5. `pnpm run build:fast`
2024-11-14 15:13:41 -08:00
Joshua Smithrud a31ed832e0
fix(api-markdown-documenter): Escape heading ID text in Markdown (#23083)
For various call signature API items, we frequently IDs like
`_call_-call`. There are a number of reasons for this, but mostly it
boils down to trying to avoid creating artificial name conflicts while
also ensuring generated files don't contain invalid characters. When we
generate heading IDs from these, we previously weren't escaping the
contents, which was invalid. Hugo previously handled this in most cases,
but Docusaurus (the tooling we're working to adopt in place of Hugo for
generating our website) does not.

This PR updates heading rendering to ensure ID contents are escaped for
Markdown.


[AB#23444](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/23444)
2024-11-14 22:52:08 +00:00
Abram Sanderson 2ba4fcd81e
refactor(tree): Convert getAllowedContentDiscrepancies to a generator (#23092)
## Description

Modifies `getAllowedContentDiscrepancies` to use a generator, which
enables more efficient code paths on early exit. Also refactors the
strategy it takes a bit to reduce code duplication.

## Reviewer Guidance

This PR should not change semantics of any codepaths.

---------

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-11-14 14:07:33 -08:00
Jason Hartman 68c47bcb91
test(client-presence): remove internal ClientConnectionManager (#23095)
- Use audience more directly in PresenceManager
- Clean up Quorum+Audience coordination
- Revise tests and add more cases:

```log
  Presence
    PresenceManager
      when connected
        attendee
          ✔ is not announced via `attendeeDisconnected` when unknown connection is removed
          that is joining
            ✔ first time is announced via `attendeeJoined` with status "Connected"
            ✔ second time is announced once via `attendeeJoined` with status "Connected" when prior is unknown
            - second time is announced once via `attendeeJoined` with status "Connected" when prior is still connected
            - first time is announced via `attendeeJoined` with status "Connected" even if unknown to audience
            ✔ second time is announced once via `attendeeJoined` with status "Connected" even if most recent unknown to audience
            ✔ as collateral and disconnected is NOT announced via `attendeeJoined`
          that is already known
            ✔ is NOT announced when "rejoined" with same connection (duplicate signal)
            - is not announced via `attendeeJoined` when already "Connected"
            ✔ with status "Connected" is available from `getAttendee` by connection id
            ✔ with status "Connected" is available from `getAttendee` by session id
            ✔ with status "Connected" is available from `getAttendees`
            ✔ with status "Disconnected" is available from `getAttendee` by connection id
            ✔ with status "Disconnected" is available from `getAttendee` by session id
            ✔ with status "Disconnected" is available from `getAttendees`
            and has their connection removed
              ✔ is announced via `attendeeDisconnected`
              ✔ is not announced via `attendeeDisconnected` when already "Disconnected"
          that is rejoining
            ✔ is NOT announced when rejoined with same connection (duplicate signal)
            ✔ is announced when rejoined with different connection and current information is updated
```

Note: some tests are disabled as they are failing
2024-11-14 13:55:05 -08:00
yann-achard-MS 011da10868
fix(tree): UsageError on dubious usage of node-exists constraint (#23094) 2024-11-14 13:43:29 -08:00
WillieHabi 7f8f204cda
improvement(client-presence): Use audience for session client connection status (#23006)
## Description
This PR updates SystemWorkspace to use audience for session client
connection status.

We also add audience support to Mock Ephemeral Runtime w/ additional
reworking of unit tests

Presence + Audience test cases to add:
- Unknown attendee joins that is in audience (=> emits attendeeJoined)
- Unknown attendee joins that is not in audience (=> does not emit
attendeeJoined)
- Known attendee rejoins that is in audience w/ same connection
(duplicate signal) (=> does not emit attendeeJoined)
- Known attendee rejoins that is in audience w/ different connection (=>
emits attendeeJoined)
- Known attendee rejoins that is not in audience w/ same connection (=>
does not emit attendeeJoined)
- Known attendee rejoins that is not in audience w/ different connection
(=> does not emit attendeeJoined)
2024-11-14 12:49:58 -08:00
Craig Macomber (Microsoft) aa2718b106
[bump] build-tools: 0.51.0 => 0.52.0 (minor) (#23091)
## Description

Bumped build-tools from 0.51.0 to 0.52.0.
2024-11-14 12:09:02 -08:00
Abram Sanderson afcf16106f
chore(tree): Rename to getAllowedContentIncompatibilities to getAllowedContentDiscrepancies (#23087)
## Description

Updates several functions and types in `discrepancies.ts` to use the
term `Discrepancy` over `Incompatibility`. The general trend I have in
mind which is staged for this code is to move policy decisions about
schema *compatibility* to the simple-tree layer, whereas this function
is a helper that enumerates ways in which two stored schemas are
different. The updated naming should help reflect this.

---------

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-11-14 11:55:52 -08:00
Tyler Butler 761f539e6d
feat(presence): Raise events for presence notifications (#22950)
Events for presence notifications have been implemented. Some
type-related workarounds were needed, but all are documented inline.

Note that the emit.unicast function, used to send notifications to
specific clients, is not tested.

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

---------

Co-authored-by: Jason Hartman <jasonha@microsoft.com>
2024-11-14 19:16:06 +00:00
Craig Macomber (Microsoft) 9485e134a3
docs: Misc tree cleanups (#23088)
## Description

Cleanup a few test and docs things in tree.
2024-11-14 18:30:40 +00:00
Sonali Deshpande 3fe3fa54bc
Remove `npm-public-package-requirements` exclusions from config (#22876)
This change removes `build:docs`, `ci:build:docs` and `api-extractor`
deps from the config. along with that, package exclusions are removed.

[ADO Work
Item](https://dev.azure.com/fluidframework/internal/_workitems/edit/7409)
2024-11-14 13:44:33 +00:00
Craig Macomber (Microsoft) cfb68388cb
fix: enum adapter fixes (#23077)
## Description

The alpha enum APIs had some typing issues where they were unioning
things at the wrong levels.

Additionally since their tests predated unhydrated node support, they
didn't make as many nodes as they probably should have.
The tests have been simplified to use unhydrated nodes in a few places
and extended to cover more cases.
More explicit type testing has been added.

This fixes an issue reported in
https://github.com/microsoft/FluidFramework/pull/23055

See changeset for details.

## Breaking Changes

See changeset.
2024-11-14 01:25:48 +00:00
MarioJGMsoft 3aff19a462
Remove back-compat code related to the op reentry checks (#22842)
Fixes:
[AB#2309](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/2309)

## Description

In light of [Remove ability to reject reentrant ops (#20621) ·
microsoft/FluidFramework@c9d1562
(github.com)](c9d156264b),
updating this to be about finishing the removal of
ensureNoDataModelChanges.

The following uses of ensureNoDataModelChanges will be removed:

- packages\runtime\container-runtime\src\channelCollection.ts:
    - ensureNoDataModelChanges: (...args) => {

- packages\runtime\container-runtime\src\dataStoreContext.ts:
    - public ensureNoDataModelChanges(callback: () => T): T {

- packages\runtime\runtime-definitions\src\dataStoreContext.ts:
   - ensureNoDataModelChanges<T>(callback: () => T): T;

- packages\runtime\test-runtime-utils\src\mocksDataStoreContext.ts:
    - public ensureNoDataModelChanges(callback: () => T): T {
2024-11-13 16:31:06 -08:00
Joshua Smithrud c4ef138fa3
docs(devtools-browser-extension): Update image assets for the devtools extension (#23081)
Also moves the "source of truth" of the images to our Azure blob storage
to reduce the number of binary files in our repo.

### Updated assets:

Logo:
![](https://storage.fluidframework.com/static/images/devtools/logo.png)

Large marquee:

![](https://storage.fluidframework.com/static/images/devtools/marquee-large.png)

Small marquee:

![](https://storage.fluidframework.com/static/images/devtools/marquee-small.png)

These updated assets have been uploaded to the Chrome and Edge stores
and will be visible to users after our next "deployment".
2024-11-13 15:52:57 -08:00
Tony Murphy 952e805137
PropertiesManager Update to Support SharedString DDS annotateAdjustRange (#23059)
This change splits out the changes the PropertiesManger class from
#22751. The goal is to supply a smaller set of changes that are easier
to review, and allow #22751 to be checked in in two parts. After this
all that will be left in #22751 is plumbing the feature through the
layers.

For the broader context of this change, please read the descriptions
from: https://github.com/microsoft/FluidFramework/pull/22751

---------

Co-authored-by: Tyler Butler <tylerbu@microsoft.com>
Co-authored-by: Abram Sanderson <Abram.sanderson@gmail.com>
2024-11-13 12:26:13 -08:00
Craig Macomber (Microsoft) db9f29e183
docs: Improve chunk comments (#23080)
## Description

Improve chunk comments
2024-11-13 11:59:53 -08:00
yann-achard-MS c7d9c18731
docs(tree): merge semantics docs for each node kind (#23040) 2024-11-13 11:37:17 -08:00
Noah Encke 2427fe3225
Refactor TreeNodeKernel to make undemanded node case explicit (#23076)
## Description

This moves `innerNode` into `#hydrationState`, which makes it clearer
what the possible states and transitions are. A side effect of this is
that the `innerNode` property is now `undefined` in the case where a
node has been hydrated by its corresponding flex node has not yet been
generated. Previously, the `innerNode` remained an
`UnhydratedFlexTreeNode` even after hydration, which while not incorrect
was still confusing to see in the debugger. This PR also does some
related cleanups. However, it does not attempt to clean up
TreeNodeKernel entirely - there is still plenty more possible cleanup,
but this PR would like to avoid trying to do everything at once.
2024-11-13 09:25:34 -08:00
Rishhi Balakrishnan d48c3b8123
Add missing eslint warns for no-unchecked-record-access (#23074)
missing these disables for no-unchecked-record-access

[AB#11815](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/11815)
2024-11-13 08:48:47 -08:00
Alex Villarreal cc41c414a2
Revert "Fix race condition while establishing connection due to multiplexing in ODSP Driver" (#23078)
Reverts microsoft/FluidFramework#23060

We're seeing a huge increase in errors in our odsp tests against both
prod and dogfood starting with the first run after this PR was merged,
so reverting as the probable culprit until we can investigate further.
2024-11-13 09:43:29 -06:00
Craig Macomber (Microsoft) 0185a08c6f
feat: Allow recursive maps from objects (#23070)
## Description

It turns out the reason I couldn't allow constructing recursive maps
from objects previously could be overcome my inlining the types. I don't
have a complete understanding of how inlineing type sometimes allows
recursive types to work better, but in this case it worked.
2024-11-13 03:05:54 +00:00
seanimam 861bc29163
Moves fluid-experimental/ai-collab package to the fluidframework/ai-c… (#23069)
Moves fluid-experimental/ai-collab package to the fluidframework/ai-collab scope.
2024-11-12 20:08:12 -05:00
Abram Sanderson cc3fb6da96
chore(tree): Simplify getAllowedContentIncompatibilities output (#23041)
Previous output allowed undefined in FieldKindIncompatibility instances
where either the stored or view schema did not have some field
implicitly. However, it is also possible to declare a field as not
present explicitly using forbidden, which should be treated identically
when considering compatibility. This updates the output representation
as well as logic to normalize implicit cases to use forbidden.

---------

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-11-12 14:49:59 -08:00
Jatin Garg 3b51758cf9
Fix race condition while establishing connection due to multiplexing in ODSP Driver (#23060)
## Description


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

This fixes a bug reported by Loop where the reconnecting banner did not
go away after user returned after being dormant for some time.

Reason for the bug:
Due to socket reuse(multiplexing), we can get "disconnect" event from
other clients in the socket reference. So, a race condition could
happen, where this client is establishing connection and listening for
"connect_document_success" on the socket among other events, but we get
"disconnect" event on the socket reference from other clients, in which
case, we dispose connection object and stop listening to further events
on the socket. Due to this we get stuck as the connection is not yet
established and so we don't return any connection object to the client
(connection manager). So, we remain stuck.
In order to handle this, listen for the "disconnect" event and reject
the promise with the error so that the caller can know and handle the
error.

---------

Co-authored-by: Jatin Garg <jatingarg@Jatins-MacBook-Pro-2.local>
2024-11-12 12:55:49 -08:00
tyler-cai-microsoft c699aee914
Improve summary documentation (#23036)
[AB#15222](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/15222)

Improve summarizer documentation
- SummaryTreeBuilder documentation
- Other summary cleanup

---------

Co-authored-by: Craig Macomber (Microsoft) <42876482+CraigMacomber@users.noreply.github.com>
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
2024-11-12 20:45:50 +00:00
Rishhi Balakrishnan 66d3bd4d5b
Disable no-unchecked-record-access for client (#23071)
Disabling no-unchecked-record-access for every client package that is
erroring when enabling this

[AB#11815](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/11815)
2024-11-12 12:44:19 -08:00
WillieHabi c7730cc96f
fix(client-presence): export SessionClientStatus type and constant (#23062)
## Description

Currently only exporting SessionClientStatus, this change exports both
the type and the constant values
2024-11-12 09:22:59 -08:00
Noah Encke c59225db03
Add `off()` method to Listenable event interface (#23046)
## Description

This exposes the `off()` method on the `Listenable` event interface,
providing an additional way to unsubscribe from events. The current way
of unsubscribing, via the deregistration function returned by `on()`, is
still supported. Having both options available is meant to give
customers options without being opinionated about the best pattern, as
it depends on preference and use case.

To prevent the two strategies from interfering with each other, it has
also been made illegal to register the same listener more than once for
the same event. It is now documented as throwing an error rather than as
undefined behavior.

This also adds a test for registering events with keys that are JS
symbols and does some minor doc cleanup.
2024-11-11 17:03:27 -08:00
Tyler Butler e0e9c89af4
refactor(build-tools): Replace chalk with picocolors (#23034)
picocolors is a smaller alternative to chalk, and it is also ESM and
CJS, while chalk went ESM-only and we were stuck on old versions in the
core build-tools project.

build-tools will eventually be ESM, and using a dual-module-format
package will actually make that transition easier because we won't have
to do dependency switches while also doing ESM conversion.
2024-11-11 15:50:08 -08:00
Timothy Trindle c9697eca2e
Save obliterate sequence number on zero-length obliterates (#23011)
This PR fixes how we save the obliterate sequence number on the
associated `pendingSegmentGroup`. Previously, the sequence number would
never be set for zero-length obliterates, so we would get stuck
considering the obliterate as unsequenced.

This PR also surfaces zero-length obliterates in
`mergeTreeDeltaCallback` as long as the obliterate's endpoints are not
equal.
2024-11-11 22:23:44 +00:00
Tony Murphy 5156eb4972
Odsp create new module (#23049)
This change takes the existing logic to load the createNewModule and
encapsulates it in a function to make it more reusable, and less error
prone.

The primary motivation for this change is that in an upcoming change
I'll want to use the createNewModule and don't want to duplicate the
existing logic

By moving the files of the createNewModule under a folder, and not
exporting them directly, it makes it clearer that they should not be
directly imported.
2024-11-11 21:48:36 +00:00
Daniel Madrid f3eeaf16c5
Repro stashed upload blob issue when processing reuploaded blob (#22981)
This is a test repro of
[AB#4630](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/4630).
To reproduce such issue, I had to fake the localId generation using
uuidOverride constructor method in the blob manager so we could aim at a
unique pending blob: such pending blob was: 1 stashed, 2 reapplied to a
different blob manager simulating rehydration, 3 processed and 4
reuploaded by stashing workflow, which ends up in the issue described in
the ADO item.
In order to wait for the reupload I had to create a different blob
manager method waitForStashedBlobs() since the one we have
hasPendingStashedUploads() uses pendingBlobs array as reference, which
blob entry would be removed by the processing step.
A fix will follow up this PR.
2024-11-11 21:35:45 +00:00
WillieHabi 3c27751350
docs(client-presence): SessionClientStatus Docs (#23008) 2024-11-11 09:37:33 -10:00
yann-achard-MS 9f60ea37ca
docs(tree): fix broken link (#23047)
## Description

Fix a link broken by
https://github.com/microsoft/FluidFramework/pull/22988.

## Breaking Changes

None
2024-11-11 10:56:34 -08:00
Alex Villarreal 25913c7780
Revert "refactor(telemetry-utlis): Make MockLogger internal" (#23035)
Reverts microsoft/FluidFramework#23010.

Since it wasn't part of the list of removals for 2.10, holding this
until 2.20.
2024-11-11 07:42:54 -08:00
Craig Macomber (Microsoft) 5405422d81
docs: More scope docs (#23026)
## Description

More docs for SchemaFactory.scope.

Convert docs to other format for parameter properties so it can have its
own subsections.
2024-11-09 03:05:54 +00:00
Craig Macomber (Microsoft) d1ba184949
docs: Add more ImplicitAllowedTypes docs (#23045)
## Description

Add more ImplicitAllowedTypes docs
2024-11-09 02:10:20 +00:00
Joshua Smithrud 92515faedf
refactor(tree): Promote eslint config from minimal base (deprecated) to recommended base (#23042)
The `minimal-deprecated` config is scheduled for deletion. This PR
migrates the tree package off of that config.

Fixes some of the simpler violations, but otherwise disables rules in
the local config for future work to address.


[AB#6983](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/6983)
2024-11-08 16:05:54 -08:00
Noah Encke aa84db1332
Update internal SharedTree types to use the `.events` pattern (#23038)
## Description

This changes all internal SharedTree objects to have an `events:
Listenable` property rather than implementing Listenable directly. Using
the `.events` pattern is preferable over the alternatives because it
does not employ inheritance (like extending `EventEmitter`) and does not
require any method implementation boilerplate (like implementing
`Listenable`). It also means that any changes to `EventEmitter` or
`Listenable` will not require changes to the object emitting the events
- this is the practical motivation for this change, as the `Listenable`
interface will soon be updated to have a new method. Without this
preparatory change, all the implementations of `Listenable` would need
to be updated at that time.
2024-11-08 20:35:31 +00:00