Skip to content

Merge main into presence-refactor#24314

Merged
WillieHabi merged 10 commits into
test/client/presence-refactorfrom
main
Apr 10, 2025
Merged

Merge main into presence-refactor#24314
WillieHabi merged 10 commits into
test/client/presence-refactorfrom
main

Conversation

@WillieHabi
Copy link
Copy Markdown
Contributor

How contribute to this repo.

Guidelines for Pull Requests.

The sections included below are suggestions for what you may want to include.
Feel free to remove or alter parts of this template that do not offer value for your specific change.

Description

A concise description of the changes (bug or feature) and their impact/motivation.
If this description is short enough to be used as the title, delete this section and just use the title.

For bug fixes, also include specifics of how to reproduce it / confirm it is fixed.

If this Pull Request should close/resolve any issues when merged, use the special syntax for that here.

Breaking Changes

If this introduces a breaking change, please describe the impact and migration path for existing applications below.
See Breaking-vs-Non-breaking-Changes for details.
If there are no breaking changes, delete this section.

Reviewer Guidance

The review process is outlined on this wiki page.

List any specific things you want to get reviewer opinions on, and anything a reviewer would need to know to review this PR effectively.
Things you might want to include:

  • Questions about how to properly make automated tests for your changes.
  • Questions about design choices you made.
  • Descriptions of how to manually test the changes (and how much of that you have done).
  • etc.

If you have any questions in this section, consider making the PR a draft until all questions have been resolved.

ChumpChief and others added 10 commits April 9, 2025 10:39
Adding a skipped test which reproduces a inconsistency in merge tree
related to rollback

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
## Description

Historian denyList is used to prevent DoS issues with our services.
However, we do not need to use the denyList for delete ops. This PR
removes the denyList from ops that are handled by the delete APIs of
Historian.
…at for old loader) (#24276)

We need to flush whenever incoming ops are processed (even non-runtime
ops), since we track the reference sequence number of the in-progress
batch and throw if it ever changes mid-batch. For this reason, we
recently started calling `flush` in `ContainerRuntime.process`.

In old loader code, `ContainerRuntime.process` is only called for
runtime messages, so it is possible for the reference sequence number to
advance without ContainerRuntime flushing.

This change adds another flush call in response to DeltaManager's "op" event
to close this gap.

It's ok to call flush extra, it's a cheap no-op if there's nothing
there.
## Bug
Recursively assinging an unhydrated and unparented node to itself hangs
forever. Note that doing the same for a parented node does throw a usage
error (added a test for this scenario)

## Fix
The root-cause of this bug is that it is stuck in a while loop in
`TreeNodeKernel` trying to emit `subtreeChangedAfterBatch` event for the
sub-tree of the node.
Added logic in `adoptBy` to detect recursion and throw a usage error.
This is where the logic to detect this for parent node happens.


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

Remove alpha+legacy tagging on some non-exported API.

Group exports to indicate which ones are actually intended to be used.
…oundBatchMessage in Outbox and related code (#24287)

This is a glorified "rename", splitting the type
`BatchMessage` into two cases: `LocalBatchMessage` and
`OutboundBatchMessage`, converting between the two when necessary.

The intention is to change no behavior with this change. Here are the
non-typing changes (that affect runtime code):

* Renaming the property `contents` to `serializedOp` for the Local batch
case
* Shallow-copy the whole batch and each message in
`Outbox.virtualizeBatch` to convert from `LocalBatch` to
`OutboundBatch`.
* This is where we copy `serializedOp` over to `contents`, which paves
the way for `serializedOp` to stop being serialized in the next PR,
which is the end goal here
* Minor refactoring of `createEmptyGroupedBatch` to support both
Local/Outbound forms

### Context

As ops are accumulated into a batch in the ContainerRuntime, they're
currently serialized immediately. However, we plan to keep those
unserialized, and only stringify when virtualizing (grouping,
compressing) in preparation to send to the server. See #24281.

This is the first step there. We should model pre/post virtualized
batches differently because they are different. pre-virtualization batch
messages are called `LocalBatchMessage` and post-virtualization are
called `OutboundBatchMessage`.
Removes lerna.json files since they are no longer used. Also removes
pipeline references to lerna.json, and cleans up a few other references
in other files.

There is a reference to lerna in a comment in the mocha-test-setup
project. I left it as-is, because it still seems relevant.

Split off from #24072.
## Description

Provide alpha APIs for accessing document contents without view schema
## Description

This PR adds a document denyList for Alfred and Nexus. This is similar
to what we have in Historian. This is added to the all Alfred APIs. The
list has two features:

1) A list of tenants to block: This list can allow blocking of all
requests from a given tenant. Useful for situations when we get DDoS-ed
by 1 tenant.
2) A list of documents to block: Blocks documents that are large in size
and can cause OOM issues. Once change here from the previous
implementation is that now we no longer use the tenantId -> documentId
map. This is to make OCE life easier. Once GUID is easier to
type/copy-paste than two GUIDs. Since DocIds are GUIDS chances of
collision are negligible.

For some `/documents` APIs, we can skip document level checks as these
ops are either `GET` for document data and not ops or are `DELETE` calls
to delete the document.

This PR also has TODOs to remove the implementation in Historian and use
the implementation in routerlicious instead.
@WillieHabi WillieHabi requested review from a team as code owners April 10, 2025 17:23
@WillieHabi WillieHabi merged commit ff45200 into test/client/presence-refactor Apr 10, 2025
46 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 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"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

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

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  163664 links
    1315 destination URLs
    1547 URLs ignored
       0 warnings
       0 errors


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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants