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

20462 Коммитов

Автор SHA1 Сообщение Дата
Tyler Butler 3b43efdcda
[bump] build-tools: 0.40.0 => 0.41.0 (minor) (#21774)
Bumped build-tools from 0.40.0 to 0.41.0.
2024-07-03 17:10:27 -07:00
Jason Hartman 730e6abd36
docs(client): remove unused lint disables (#21777)
post
[AB#7608](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/7608)
fix
2024-07-04 00:09:39 +00:00
Tyler Butler 05193dc064
ci(client): Trigger client build when markdown-magic is changed (#21775)
The markdown-magic project is now a part of the client release group,
but changes to it were not triggering client CI builds. This change
should address that.
2024-07-03 23:41:57 +00:00
jzaffiro 092157b6b3
Disable test for compressing content over max op size (#21772)
For now, skip the test that fails on local server. A more long-term fix
will be tracked in
[AB#8608](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8608).
2024-07-03 22:41:35 +00:00
Tyler Butler 125d1a2d8b
feat(build-cli): Add release:prepare command (#16686)
One of the valuable things the `release` command does is run a series of
checks to make sure the branch is ready to serve as the base of a
release branch. These checks may require changes, such as tagging
asserts or generating changelogs. These changes need to be merged before
the release branches are created to ensure the release branches have
those changes.

However, the release command runs these checks and immediately exits if
one fails, and it also makes local changes when needed. It is not really
possible to just run the checks and get their results without making
changes.

This PR implements a new `release prepare` command that runs these
checks without making changes and reports the results, along with a
command that may resolve the problem.

### Implementation notes

I considered using the StateMachineCommand as a base and replicating the
checks exactly as they're done in the `release` command, but that
pattern is not as great as I once thought. It would require creating a
new state machine, duplicating pieces of the release one, and it
intuitively feels too complicated for this use. It's arguably too
complicated for its current use in `release`, and this is a much simpler
command.

I also considered adding a new flag to the release command, but it's
already so complex that adding a new flag multiplies it that much more.

Instead, I copied and refactored the core of the existing checks into
new functions that require fewer arguments and return more useful data
than the state machine handler functions.

---------

Co-authored-by: Craig Macomber (Microsoft) <42876482+CraigMacomber@users.noreply.github.com>
2024-07-03 15:37:09 -07:00
tyler-cai-microsoft 580eee4e73
Revert data virtualization in stress tests (#21771)
[AB#8578](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8578)

Revert all changes made to stress tests as this can cause significant
issues.

Reverts these commits in order
https://github.com/microsoft/FluidFramework/pull/21759 ->
0cec248a30
https://github.com/microsoft/FluidFramework/pull/21750 ->
7634e10ba5
https://github.com/microsoft/FluidFramework/pull/21713 ->
6510988ced
2024-07-03 15:08:21 -07:00
Rishhi Balakrishnan 89df739e15
Enable noUncheckedIndexedAccess for Local Driver (#21662)
Enable noUncheckedIndexedAccess for Local Driver
The property noUncheckedIndexedAccess is being enabled to improve type
safety by making the TypeScript compiler assume all arrays are sparse,
which requires runtime validation or non-null assertions for indexed
access. This aims to catch potential issues with type changes and ensure
API semver compliance

[AB#8216](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8216)
2024-07-03 20:00:18 +00:00
Rishhi Balakrishnan 3b1be6f9a7
Enable noUncheckedIndexedAccess for ODSP URL Resolver (#21665)
Enable noUncheckedIndexedAccess for ODSP URL Resolver
The property noUncheckedIndexedAccess is being enabled to improve type
safety by making the TypeScript compiler assume all arrays are sparse,
which requires runtime validation or non-null assertions for indexed
access. This aims to catch potential issues with type changes and ensure
API semver compliance

[AB#8216](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8216)
2024-07-03 19:50:57 +00:00
Rishhi Balakrishnan 57cac49343
Enable noUncheckedIndexedAccess for Driver Base (#21660)
Enable noUncheckedIndexedAccess for Driver Base
The property noUncheckedIndexedAccess is being enabled to improve type
safety by making the TypeScript compiler assume all arrays are sparse,
which requires runtime validation or non-null assertions for indexed
access. This aims to catch potential issues with type changes and ensure
API semver compliance

[AB#8216](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8216)
2024-07-03 19:36:32 +00:00
Rishhi Balakrishnan 72c97d404e
Enable noUncheckedIndexedAccess for merge tree (#21461)
Enabling noUncheckedIndexedAccess for merge tree

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

---------

Co-authored-by: Abram Sanderson <Abram.sanderson@gmail.com>
2024-07-03 10:35:48 -07:00
Rishhi Balakrishnan fa5bc514fb
Enable noUncheckedIndexedAccess for Replay Driver (#21667)
Enable noUncheckedIndexedAccess for Replay Driver. I will update the
TODOs with the standardized comment
The property noUncheckedIndexedAccess is being enabled to improve type
safety by making the TypeScript compiler assume all arrays are sparse,
which requires runtime validation or non-null assertions for indexed
access. This aims to catch potential issues with type changes and ensure
API semver compliance

[AB#8216](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8216)
2024-07-03 10:28:30 -07:00
Rishhi Balakrishnan 61d1be9d38
Enable noUncheckedIndexedAccess for File Driver (#21661)
Enable noUncheckedIndexedAccess for File Driver
The property noUncheckedIndexedAccess is being enabled to improve type
safety by making the TypeScript compiler assume all arrays are sparse,
which requires runtime validation or non-null assertions for indexed
access. This aims to catch potential issues with type changes and ensure
API semver compliance

[AB#8216](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8216)
2024-07-03 10:28:11 -07:00
Rishhi Balakrishnan 437214fa04
Enable noUncheckedIndexedAccess for Driver Web Cache (#21663)
Enable noUncheckedIndexedAccess for Driver Web Cache
The property noUncheckedIndexedAccess is being enabled to improve type
safety by making the TypeScript compiler assume all arrays are sparse,
which requires runtime validation or non-null assertions for indexed
access. This aims to catch potential issues with type changes and ensure
API semver compliance

[AB#8216](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8216)
2024-07-03 10:26:13 -07:00
Rishhi Balakrishnan e77e548884
Enable noUncheckedIndexedAccess for tinylicious-driver (#21658)
Enabling noUncheckedIndexedAccess for tinylicious-driver

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

---------

Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
2024-07-03 16:58:47 +00:00
Joshua Smithrud 8760ce16dc
docs(merge-tree,sequence): Update READMEs with common template contents (#21751)
Also updates embed line numbers for website articles, which copy
contents from these READMEs for public consumption.
2024-07-03 11:20:06 -04:00
yann-achard-MS 755ce9fba6
fix(tree): prevent merges and rebases while a transaction is in progress (#21765) 2024-07-03 02:20:21 -07:00
Jason Hartman dc16a91cff
fix(build-tools): correct tool ref (#21763)
in generated header
2024-07-02 20:05:30 -07:00
Joshua Smithrud 005544c7f1
docs(cell): Update README with common template contents and to indicate its status as an example (#21752)
Cell isn't a DDS we actually expect customers to use, but there is
nothing in its documentation to indicate such. This PR adds notes to
this effect, and also updates the package README to use our complete
README template.
2024-07-03 00:49:55 +00:00
Jason Hartman d83c1b59c0
improvement(build-tools): preserve `@packageDocumentation` with `generate entrypoints` (#21762)
Copy `@packageDocumentation` comment found in entrypoint to conform with
api-extractor expectations.

Comment is not copied to Node10 compat files.

[AB#8516](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8516)
2024-07-02 17:07:16 -07:00
tyler-cai-microsoft 0cec248a30
Data virtualization: Disable virtualization in stress tests (#21759)
[AB#8578](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8578)

Disable Data virtualization in stress tests because it's causing a
timeout that needs investigation. The feature is off for AFR and that is
running as usual.
2024-07-02 15:59:00 -07:00
Joshua Smithrud 5049608f3f
docs: Fix broken markdown-magic embed line numbers in website articles (#21756)
Recent updates to package READMEs broke the embed line numbers for some
articles. This fixes them.
2024-07-02 14:30:48 -07:00
Mark Fields 68feb6c6f2
PendingStateManager: Light refactoring/renaming (prep for BatchId) (#21738)
Some light refactoring:
* Rename `IPendingBatchMessage` to `PendingMessageResubmitData` to
better reflect its purpose
* Rename `IBatch.content` to `IBatch.messages`
* Add/use helper for strongly typed access to batch metadata
* Remove redundant `reSubmit` callback for PSM's use; it can/should
always use `reSubmitBatch`.
* Everything is always batches in Turn-Based mode, and there's no harm
in treating it the same for Immediate mode.
* There's no functional change here in this PR, thanks to [this bug
fix](https://github.com/markfields/FluidFramework/blob/main/packages/runtime/container-runtime/src/containerRuntime.ts#L1555)
a few months back.
2024-07-02 14:20:28 -07:00
Alex Villarreal 1dbe736b4c
refactor(tree): Optimize leaf access on arrays (#21746) 2024-07-02 20:52:10 +00:00
yann-achard-MS eb53fd74c6
fix(tree): fix serialization of refreshers (#21749) 2024-07-02 20:50:44 +00:00
Abram Sanderson 664ad082c9
Document rationale for enabling exactOptionalPropertyTypes and noUncheckedIndexedAccess (#21754)
## Description

Adds a reference to https://semver-ts.org above relevant compiler
settings in our base tsconfig.

---------

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-07-02 19:33:29 +00:00
Tyler Butler 11ef2147d8
fix(property-changeset): Use CommonJS entrypoints for main/types fields (#21744)
The property-changeset package was changed to dual emit CJS and ESM, and
the `main`/`types` field was changed to point to ESM. Unfortunately, the
property-properties package has a dependency on this package and it is
CJS-only and still using Node10 module resolution.

To address this incompatibility, I have reverted the changes to the main
and types fields - they now point to the CommonJS entrypoint.
2024-07-02 12:24:54 -07:00
Craig Macomber (Microsoft) 3d984f7e25
tree: Improve SchemaFactory scope docs. (#21748)
## Description

Customers have found ScheamFactory.scope's intended usage unclear. This
attempts to clarify with improved documentation.
2024-07-02 12:23:19 -07:00
Craig Macomber (Microsoft) 97db1764f7
build(build-tools): Use TS 5.4 in build-tools (#21733)
## Description

Update build tools to TypeScript 5.4. This caused a difference enum type
checking detected by our type test validation suite which got updated
accordingly.
2024-07-02 12:22:57 -07:00
Tyler Butler 67ce4d46b7
ci: Run PR labeler on release branches (#21753) 2024-07-02 11:55:12 -07:00
tyler-cai-microsoft 7634e10ba5
Tune test-service-load config (#21750)
The Stress tests have been timing out.

Likely due to creating too many and loading too many datastores. This
tunes the creation back significantly.
2024-07-02 18:51:08 +00:00
Joshua Smithrud bd5d909183
docs: Update README dependency instruction templates to offer guidance for unstable API use (#21740)
Updates the guidance for use of `^` to be specific to using our public
APIs. Recommends `~` dependencies for unstable APIs.
2024-07-02 18:11:55 +00:00
Tyler Butler 6bc082b755
fix(version-tools): Fix scheme detection and add more test cases (#21710)
In #21641 I tried to fix version comparisons between semver and RC
prereleasse builds. Unfortunately, the fix was flawed because the scheme
detection was not run on the input version, but rather the "internal
version" in the case of internal/RC builds. This caused patch releases
to get identified as major releases in the RC pipelines, which in turn
causes GH releases to be created incorrectly.

I corrected the code by running schema detection earlier in the
function, and I added several test cases around RC versions to ensure
the bug was addressed.
2024-07-02 11:03:11 -07:00
Alex Villarreal 404ce55e9c
test(tree): Tests to validate no flex nodes are allocated on leaf access (#21742) 2024-07-02 12:38:44 -05:00
yann-achard-MS 216d706f1a
perf(tree): avoid unnecessary deep copy of inner maps (#21727) 2024-07-02 17:21:48 +00:00
Craig Macomber (Microsoft) 7569825f94
tree: Detect if accessing root leaks (#21715)
## Description

Add a couple tests for leaks. Turns out these cases don't leak.
2024-07-02 17:12:54 +00:00
Tyler Butler 2b2a2f2872
feat(check:policy): Add policy to validate repository.directory field in package.json (#21605)
Adds a check to an existing policy that checks the repository.directory
field in package.json is set correctly.

Changes were pre-applied to the repo in #21689.
2024-07-02 09:52:38 -07:00
Tony Murphy abcf1f6c41
Refactor BlobManager Snapshot and Summary Code (#21729)
This change is purely about refactoring to make the code easier to
modify later. The change moves all the snapshot and summary
implementation for the blob manager into a single file and lays out a
pattern for versioning. This change also moves to free functions and
removes statics where possible as they are more bundle efficient than
members, and are easier to test and maintain.
2024-07-02 09:41:18 -07:00
Craig Macomber (Microsoft) 8b542d3f5f
fix(fluid-tsc): Make --build fluid-tsc command not fail with no output (#21734)
## Description

tsCompile.ts just does nothing when parseCommandLine returned undefined,
and parseCommandLine returns undefined if tsLib.parseCommandLine reports
errors.

When the command was 'tsc --build ./src/test/tsconfig.cjs.json --force',
an error "Compiler option '--force' may only be used with '--build'." is
reported (due to https://github.com/microsoft/TypeScript/issues/59095 ),
which used to be dropped.

This change ensures the error is at least printed (confirmed to work
with manual testing), as well as removed --force to work around this
specific error.

This workaround may convert cases which silently error into having an
incremental build bug in some cases. This is required to enable
https://github.com/microsoft/FluidFramework/pull/21579 which will allow
us to detect bad d.ts file generation by importing d.ts files from test
schema in the tree tests. As we have multiple know issues with the d.ts
file generation, testing it is valuable. Given we already have known
incremental build issues with tests (cleanup of extra files), so we have
to clean build them occasionally, this seems like a decent tradeoff.
2024-07-02 09:19:26 -07:00
Joshua Smithrud 39dc6d8e07
docs: Update public-facing packages' READMEs to include common template contents (#21735)
Also makes some minor organization updates for consistency.
2024-07-02 01:12:24 +00:00
Joshua Smithrud b6500f6040
docs: Fix typo in private-package notice template, and update READMEs (#21739)
Fixes a typo
2024-07-02 00:15:46 +00:00
Joshua Smithrud 667b3971d3
docs: Update README "Help" template to point to our website, rather than primarily pointing to our github wiki (#21736)
Our github wiki isn't really tailored for public consumers; that's what
our website is for.

This PR updates our README "Help" template (and all consuming READMEs)
to point users exclusively to our website for learning.
2024-07-01 23:07:42 +00:00
tyler-cai-microsoft 6510988ced
Data virtualization: loadinggroupId data stores to stress tests (#21713)
[AB#8034](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8034)

### Description
Add data virtualization tests in which we create, load, and modify
loadinggroupId datastores. What is added to the stress tests are these
sets of actions during sending ops:
- These datastores will be randomly created with some groupId based on
the size of the groupId map
- These datastores will be randomly loaded (pure reading)
- These datastores will be randomly modified (an op sent via the root
directory).
2024-07-01 22:45:44 +00:00
Mark Fields 5f69bf6c55
Offline: Provide incoming batch's starting CSN to the PendingStateManager (#21714)
On submit, the PendingStateManager stores the batch's starting CSN along
with each message. We need the corresponding information for incoming
messages too, for two reasons:

1. We can assert that they match as we process incoming acks for local
messages
2. We need it to compute batch ID, when checking for the same batch
coming from a forked container.

Today, two things happening in RemoteMessageProcessor keep the correct
info from flowing to the PSM:

1. Grouped Batches overwrite clientSequenceNumber with the index into
the batch
2. Without Grouped Batching, batch messages are processed one-by-one, so
the context of the start of the batch is not available when later
messages are sent to PSM.

Here's the fix - the RemoteMessageProcessor has the full context and can
return the batch's starting CSN with each message, irrespective of
grouped batching, compression, chunking, etc.
2024-07-01 15:14:02 -07:00
Craig Macomber (Microsoft) 60152ed54c
Fix links in tree docs (#21712)
## Description

Fix several links in tree docs.
2024-07-01 14:28:15 -07:00
Abram Sanderson 9d02adb482
Fix fetch-tool's handling of 410 errors from odsp (#21610)
## Description

Fetch-tool has some logic to download 'as many ops as possible' when
older ops have been deleted. This logic appears to not have been updated
at some point for a new error format coming from odsp-driver, which
caused fetch-tool to choke before downloading/writing messages.json with
an unintuitive error. This change fixes that and makes future changes to
the 410 format give a more clear error message.

---------

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-07-01 14:18:01 -07:00
Abram Sanderson 04987394f4
Use @azure/identity in fetch-tool (#21718)
## Description

Replaces our current authentication flow to odsp by leveraging
\@azure/identity and \@azure/identity-cache-persistence. This generally
simplifies the setup of fetch-tool and comes with two security benefits
over the previous setup:

1. \@azure/identity uses the PKCE extension to the authorization code
flow
2. Cached credentials are encrypted before being stored on disk

I've included a couple smaller fixes/improvements to fetch-tool's output
to help diagnose issues.

---------

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-07-01 13:44:10 -07:00
Matt Rakow 684307e0f8
Remove AzureFunctionTokenProvider from azure-client (#21732) 2024-07-01 13:25:54 -07:00
Navin Agarwal 5b2aad3dec
[Summarization] Added tests for scenarios where summarizer receives newer summary ack (#21711)
There can be scenarios such as DB rollback in server, where the latest
snapshot is lost but the corresponding summary ack is still present.
Currentlty, if a summarizer receives an ack that is newer that the
summary it's tracking, it will fetch latest snapshot and close. So, in
the above scenario, the summarizer would be stuck in loop fetching
snapshot and closing corrupting the document. There is no way out of
this state.

I have added tests for the following scenarios which includes the one
described above:
- A summarizer receives a summary ack that is newer and it fetches the
corresponding snapshot.
- A summarizer receives a summary ack that is newer but it fetches an
older snapshot.

Once we have a fix for the bug described above, we can use the above
tests to validate it.

There are couple other changes:
- Combined tests in
`summarizeWithOutOfOrderDataStoreRealization.spec.ts` and
`summarizationEdgeCases.spec.ts` as they were related.
- Fixed "Fluid.ContainerRuntime.Test.CloseSummarizerDelayOverrideMs"
setting to done before each test and reset after.


[AB#8334](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8334)
2024-07-01 12:56:36 -07:00
Wayne Ferrao 8af4d94a93
feat(devtools): Add accessibilty test coverage for Devtools (#21699)
[AB#8206](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8206)

## Description

This PR adds accessibility test coverage for Fluid Dev Tools to the
following components:
- Menu
- AudienceStateTable
- AudienceHistoryTable 
- OpLatencyView
2024-07-01 12:05:01 -07:00
Jason Hartman 775079fd2f
fix(client-odsp-client): apply API trimming (#21716)
typescript builds against `odsp-client` must use `/beta` import spec
path to import `@beta` APIs.

Correct use within examples including mismatched `TokenResponse` import.
2024-07-01 10:49:22 -07:00