@fluidframework/container-runtime 2.71.0 → 2.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.cjs CHANGED
@@ -9,7 +9,7 @@ module.exports = {
9
9
  project: ["./tsconfig.json", "./src/test/tsconfig.json"],
10
10
  },
11
11
  rules: {
12
- // FIXME: temporarily disabled because of crashes in typescript-eslint on destructuring in promise chains.
12
+ // AB#51780: temporarily disabled because of crashes in typescript-eslint on destructuring in promise chains.
13
13
  // See: channelCollection.ts:1070
14
14
  "@typescript-eslint/unbound-method": "off",
15
15
  },
@@ -23,7 +23,7 @@ module.exports = {
23
23
  "unicorn/consistent-function-scoping": "off",
24
24
 
25
25
  // Test files are run in node only so additional node libraries can be used.
26
- "import/no-nodejs-modules": ["error", { allow: ["node:assert", "node:crypto"] }],
26
+ "import-x/no-nodejs-modules": ["error", { allow: ["node:assert", "node:crypto"] }],
27
27
  },
28
28
  },
29
29
  ],
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluidframework/container-runtime
2
2
 
3
+ ## 2.72.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.71.0
4
8
 
5
9
  Dependency updates only.
@@ -101,7 +105,6 @@ Dependency updates only.
101
105
  - Unnecessary exports are now removed from container-runtime ([#23981](https://github.com/microsoft/FluidFramework/pull/23981)) [74896b92e8](https://github.com/microsoft/FluidFramework/commit/74896b92e8878911e9e4874a8ac45e659a293110)
102
106
 
103
107
  The following types in the @fluidframework/container-runtime are now removed. These types are unnecessary for external users of this package.
104
-
105
108
  - currentDocumentVersionSchema
106
109
  - DeletedResponseHeaderKey
107
110
  - DocumentSchemaValueType
@@ -135,7 +138,6 @@ Dependency updates only.
135
138
  - The process and processDocumentSchemaOp functions have been removed ([#24018](https://github.com/microsoft/FluidFramework/pull/24018)) [bc35d543d5](https://github.com/microsoft/FluidFramework/commit/bc35d543d58c7e4bf28944b09d645cc26bf28a29)
136
139
 
137
140
  `process` has been replaced by `processMessages` from the following:
138
-
139
141
  - `FluidDataStoreRuntime`
140
142
  - `IDeltaHandler`
141
143
  - `IFluidDataStoreChannel`
@@ -161,7 +163,6 @@ Dependency updates only.
161
163
  - Many unnecessary exports have been deprecated in the container-runtime package ([#23607](https://github.com/microsoft/FluidFramework/pull/23607)) [3da5b427ef](https://github.com/microsoft/FluidFramework/commit/3da5b427ef406799abade04196e43bb6d66d898d)
162
164
 
163
165
  The following types in the `@fluidframework/container-runtime` package are now deprecated. These types are unnecessary for external users of this package.
164
-
165
166
  - currentDocumentVersionSchema
166
167
  - DeletedResponseHeaderKey
167
168
  - DocumentSchemaValueType
@@ -221,7 +222,6 @@ Dependency updates only.
221
222
  parameter.
222
223
 
223
224
  These changes were originally announced in version 0.25.0. See the following issues for more details:
224
-
225
225
  - [#1537](https://github.com/microsoft/FluidFramework/issues/1537)
226
226
  - [#2931](https://github.com/microsoft/FluidFramework/pull/2931)
227
227
 
@@ -261,12 +261,10 @@ Dependency updates only.
261
261
  The class `ContainerRuntime` is deprecated and will no longer be exported starting in version 2.20.0.
262
262
 
263
263
  There are two possible migration paths to stop using `ContainerRuntime`:
264
-
265
264
  - When using it as a type, replace it with an interface like `IContainerRuntime`
266
265
  - When using the static function `ContainerRuntime.loadRuntime` replace it with the free function `loadContainerRuntime`.
267
266
 
268
267
  `BaseContainerRuntimeFactory` has some changes as well, since it exposed `ContainerRuntime` in several function signatures:
269
-
270
268
  - `instantiateFirstTime` - Takes the wider type `IContainerRuntime` instead of `ContainerRuntime`
271
269
  - `instantiateFromExisting` - Takes the wider type `IContainerRuntime` instead of `ContainerRuntime`
272
270
  - `preInitialize` - deprecated as well, since it returns `ContainerRuntime`
@@ -298,7 +296,6 @@ Dependency updates only.
298
296
  Synchronous creation relies on both the factory and the datastore to support it. This means that asynchronous operations, such as resolving handles, some browser API calls, consensus-based operations, or other asynchronous tasks, cannot be performed during the creation flow. Therefore, synchronous child datastore creation is best limited to scenarios where the existing asynchronous process cannot be used, such as when a new datastore must be created in direct response to synchronous user input.
299
297
 
300
298
  #### Key Benefits
301
-
302
299
  - **Synchronous Creation**: Allows for the immediate creation of child datastores without waiting for asynchronous operations.
303
300
  - **Strong Typing**: Ensures type safety and better developer experience by leveraging TypeScript's type system.
304
301
 
@@ -346,7 +343,6 @@ Dependency updates only.
346
343
  ### Minor Changes
347
344
 
348
345
  - "Remove `IFluidParentContext.ensureNoDataModelChanges` and its implementations ([#22842](https://github.com/microsoft/FluidFramework/pull/22842)) [3aff19a462](https://github.com/microsoft/FluidFramework/commit/3aff19a4622a242e906286c14dfcfa6523175132)
349
-
350
346
  - `IFluidParentContext.ensureNoDataModelChanges` has been removed. [prior deprecation commit](https://github.com/microsoft/FluidFramework/commit/c9d156264bdfa211a3075bdf29cde442ecea234c)
351
347
  - `MockFluidDataStoreContext.ensureNoDataModelChanges` has also been removed.
352
348
 
@@ -359,7 +355,6 @@ Dependency updates only.
359
355
  Similarly, `IDeltaManager.outbound` contained functionality that could break core runtime features such as generation of batches and chunking. Data loss or corruption could occur when `IDeltaManger.inbound.pause()` or `IDeltaManager.inbound.resume()` were called.
360
356
 
361
357
  #### Alternatives
362
-
363
358
  - Alternatives to `IDeltaManager.inbound.on("op", ...)` are `IDeltaManager.on("op", ...)`
364
359
  - Alternatives to calling `IDeltaManager.inbound.pause`, `IDeltaManager.outbound.pause` for `IContainer` disconnect use `IContainer.disconnect`.
365
360
  - Alternatives to calling `IDeltaManager.inbound.resume`, `IDeltaManager.outbound.resume` for `IContainer` reconnect use `IContainer.connect`.
@@ -371,7 +366,6 @@ Dependency updates only.
371
366
  - Signal telemetry events details ([#22804](https://github.com/microsoft/FluidFramework/pull/22804)) [e6566f6358](https://github.com/microsoft/FluidFramework/commit/e6566f6358551b5e579637de6c111d42281f7716)
372
367
 
373
368
  Properties of `eventName`s beginning "fluid:telemetry:ContainerRuntime:Signal" are updated to use `details` for all event specific information. Additional per-event changes:
374
-
375
369
  - SignalLatency: shorten names now that data is packed into details. Renames:
376
370
  - `signalsSent` -> `sent`
377
371
  - `signalsLost` -> `lost`
@@ -425,12 +419,10 @@ Dependency updates only.
425
419
  disabled or controlled:
426
420
 
427
421
  GC runtime options removed:
428
-
429
422
  - `gcDisableThrowOnTombstoneLoad`
430
423
  - `disableDataStoreSweep`
431
424
 
432
425
  GC configs removed:
433
-
434
426
  - `"Fluid.GarbageCollection.DisableTombstone"`
435
427
  - `"Fluid.GarbageCollection.ThrowOnTombstoneUsage"`
436
428
  - `"Fluid.GarbageCollection.DisableDataStoreSweep"`
@@ -457,7 +449,6 @@ Dependency updates only.
457
449
 
458
450
  Access to these now less public types should not be required for users of the `@public` "declarative API" exposed in the `fluid-framework` package, but can still be accessed for those who need them under the `/legacy` import paths.
459
451
  The full list of such types is:
460
-
461
452
  - `SharedTree` as exported from `@fluidframwork/tree`: It is still exported as `@public` from `fluid-framework` as `SharedObjectKind`.
462
453
  - `ISharedObjectKind`: See new `SharedObjectKind` type for use in `@public` APIs.
463
454
  `ISharedObject`
@@ -475,7 +466,6 @@ Dependency updates only.
475
466
  - `IProvideFluidHandleContext`
476
467
 
477
468
  Removed APIs:
478
-
479
469
  - `DataObjectClass`: Usages replaced with `SharedObjectKind`.
480
470
  - `LoadableObjectClass`: Replaced with `SharedObjectKind`.
481
471
  - `LoadableObjectClassRecord`: Replaced with `Record<string, SharedObjectKind>`.
@@ -496,12 +486,10 @@ Dependency updates only.
496
486
  - Audience & connection sequencing improvements [96872186d0](https://github.com/microsoft/FluidFramework/commit/96872186d0d0f245c1fece7d19b3743e501679b6)
497
487
 
498
488
  Here are breaking changes in Audience behavior:
499
-
500
489
  1. IAudience no longer implements EventEmmiter. If you used addListener() or removeListener(), please replace with on() & off() respectively.
501
490
  2. IAudience interface implements getSelf() method and "selfChanged" event.
502
491
  3. IContainerContext.audience is no longer optional
503
492
  4. "connected" events are now raised (various API surfaces - IContainer, IContainerRuntime, IFluidDataStoreRuntime, etc.) a bit later in reconnection sequence for "read" connections - only after client receives its own "join" signal and caught up on ops, which makes it symmetrical with "write" connections.
504
-
505
493
  - If this change in behavior breaks some scenario, please let us know immediately, but you can revert that behavior using the following feature gates:
506
494
  - "Fluid.Container.DisableCatchUpBeforeDeclaringConnected"
507
495
  - "Fluid.Container.DisableJoinSignalWait"
@@ -522,7 +510,6 @@ Dependency updates only.
522
510
 
523
511
  Make IFluidDataStoreRuntime.deltaManager have an opaque type.
524
512
  Marks the following types which were reachable from it as alpha:
525
-
526
513
  - IConnectionDetails
527
514
  - IDeltaSender
528
515
  - IDeltaManagerEvents
@@ -546,7 +533,6 @@ Dependency updates only.
546
533
  TypeScript types and implementation code.
547
534
 
548
535
  This means that using Fluid Framework packages require the following TypeScript settings in tsconfig.json:
549
-
550
536
  - `"moduleResolution": "Node16"` with `"module": "Node16"`
551
537
  - `"moduleResolution": "Bundler"` with `"module": "ESNext"`
552
538
 
@@ -565,26 +551,21 @@ Dependency updates only.
565
551
  - container-runtime: New feature: ID compression for DataStores & DDSs ([#19859](https://github.com/microsoft/FluidFramework/issues/19859)) [51f0d3db73](https://github.com/microsoft/FluidFramework/commits/51f0d3db737800e1c30ea5e3952d38ff30ffc7da)
566
552
 
567
553
  ### Key changes
568
-
569
554
  1. A new API IContainerRuntimeBase.generateDocumentUniqueId() is exposed. This API will opportunistically generate IDs in short format (non-negative numbers). If it can't achieve that, it will return UUID strings. UUIDs generated will have low entropy in groups and will compress well. It can be leveraged anywhere in container where container unique IDs are required. I.e. any place that uses uuid() and stores data in container is likely candidate to start leveraging this API.
570
555
  2. Data store internal IDs (IDs that are auto generated by FF system) will opportunistically be generated in shorter form. Data stores created in detached container will always have short IDs, data stores created in attached container will opportunistically be short (by using newly added IContainerRuntimeBase.generateDocumentUniqueId() capability)
571
556
  3. Similar DDS names will be opportunistically short (same considerations for detached DDS vs. attached DDS)
572
557
 
573
558
  ### Implementation details
574
-
575
559
  1. Container level ID Compressor can now be enabled with delay. With such setting, only new IContainerRuntimeBase.generateDocumentUniqueId() is exposed (ID Compressor is not exposed in such case, as leveraging any of its other capabilities requires future container sessions to load ID Compressor on container load, for correctness reasons). Once Container establishes connection and any changes are made in container, newly added API will start generating more compact IDs (in most cases).
576
560
 
577
561
  ### Breaking changes
578
-
579
562
  1. DDS names can no longer start with "\_" symbol - this is reserved for FF needs. I've validated that's not an issue for AzureClient (it only creates root object by name, everything else is referred by handle). Our main internal partners almost never use named DDSs (I can find only 4 instances in Loop).
580
563
 
581
564
  ### Backward compatibility considerations
582
-
583
565
  1. Data store internal IDs could collide with earlier used names data stores. Earlier versions of FF framework (before DataStore aliasing feature was added) allowed customers to supply IDs for data stores. And thus, files created with earlier versions of framework could have data store IDs that will be similar to names FF will use for newly created data stores ("A", ... "Z", "a"..."z", "AA", etc.). While such collision is possible, it's very unlikely (almost impossible) if user-provided names were at least 4-5 characters long.
584
566
  2. If application runs to these problems, or wants to reduce risks, consider disabling ID compressor via IContainerRuntimeOptions.enableRuntimeIdCompressor = "off".
585
567
 
586
568
  ### Minor changes
587
-
588
569
  1. IContainerRuntime.createDetachedRootDataStore() is removed. Please use IContainerRuntime.createDetachedDataStore and IDataStore.trySetAlias() instead
589
570
  2. IContainerRuntimeOptions.enableRuntimeIdCompressor has been changes from boolean to tri-state.
590
571
 
@@ -619,7 +600,6 @@ Dependency updates only.
619
600
  - Updated server dependencies ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
620
601
 
621
602
  The following Fluid server dependencies have been updated to the latest version, 3.0.0. [See the full changelog.](https://github.com/microsoft/FluidFramework/releases/tag/server_v3.0.0)
622
-
623
603
  - @fluidframework/gitresources
624
604
  - @fluidframework/server-kafka-orderer
625
605
  - @fluidframework/server-lambdas
@@ -658,7 +638,6 @@ Dependency updates only.
658
638
  - container-runtime: Removed request pattern from ContainerRuntime, IRuntime, and IContainerRuntimeBase [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
659
639
 
660
640
  The `request(...)` method and `IFluidRouter` property have been removed from the following places:
661
-
662
641
  - `ContainerRuntime`
663
642
  - `IRuntime`
664
643
  - `IContainerRuntimeBase`
@@ -719,7 +698,6 @@ Dependency updates only.
719
698
  - DEPRECATED: container-runtime: requestHandlers are deprecated [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
720
699
 
721
700
  The concept of `requestHandlers` has been deprecated. Please migrate all usage of the following APIs to the new `entryPoint` pattern:
722
-
723
701
  - `requestHandler` property in `ContainerRuntime.loadRuntime(...)`
724
702
  - `RuntimeRequestHandler`
725
703
  - `RuntimeRequestHandlerBuilder`
@@ -734,14 +712,12 @@ Dependency updates only.
734
712
  See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md) for more details.
735
713
 
736
714
  - container-runtime: Removing some deprecated and likely unused ContainerRuntime APIs [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
737
-
738
715
  - `IGCRuntimeOptions.sweepAllowed`
739
716
  - `ContainerRuntime.reSubmitFn`
740
717
 
741
718
  - Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
742
719
 
743
720
  This included the following changes from the protocol-definitions release:
744
-
745
721
  - Updating signal interfaces for some planned improvements. The intention is split the interface between signals
746
722
  submitted by clients to the server and the resulting signals sent from the server to clients.
747
723
  - A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
@@ -752,7 +728,6 @@ Dependency updates only.
752
728
  - DEPRECATED: resolveHandle and IFluidHandleContext deprecated on IContainerRuntime [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
753
729
 
754
730
  The `resolveHandle(...)` and `get IFluidHandleContext()` methods have been deprecated on the following interfaces:
755
-
756
731
  - `IContainerRuntime`
757
732
  - `IContainerRuntimeBase`
758
733
 
@@ -763,7 +738,6 @@ Dependency updates only.
763
738
  - Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
764
739
 
765
740
  Dependencies on the following Fluid server package have been updated to version 2.0.1:
766
-
767
741
  - @fluidframework/gitresources: 2.0.1
768
742
  - @fluidframework/server-kafka-orderer: 2.0.1
769
743
  - @fluidframework/server-lambdas: 2.0.1
@@ -792,7 +766,6 @@ Dependency updates only.
792
766
  - test-utils: provideEntryPoint is required [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
793
767
 
794
768
  The optional `provideEntryPoint` method has become required on a number of constructors. A value will need to be provided to the following classes:
795
-
796
769
  - `BaseContainerRuntimeFactory`
797
770
  - `RuntimeFactory`
798
771
  - `ContainerRuntime` (constructor and `loadRuntime`)
@@ -835,7 +808,6 @@ Dependency updates only.
835
808
 
836
809
  The **@fluidframework/common-definitions** package is being deprecated, so the following interfaces and types are now
837
810
  imported from the **@fluidframework/core-interfaces** package:
838
-
839
811
  - interface IDisposable
840
812
  - interface IErrorEvent
841
813
  - interface IErrorEvent
@@ -882,7 +854,6 @@ Dependency updates only.
882
854
  - Request APIs deprecated from many places [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
883
855
 
884
856
  The `request` API (associated with the `IFluidRouter` interface) has been deprecated on a number of classes and interfaces. The following are impacted:
885
-
886
857
  - `IRuntime` and `ContainerRuntime`
887
858
  - `IFluidDataStoreRuntime` and `FluidDataStoreRuntime`
888
859
  - `IFluidDataStoreChannel`
@@ -898,7 +869,6 @@ Dependency updates only.
898
869
  - `initializeEntryPoint` will become required [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
899
870
 
900
871
  The optional `initializeEntryPoint` method has been added to a number of constructors. **This method argument will become required in an upcoming release** and a value will need to be provided to the following classes:
901
-
902
872
  - `BaseContainerRuntimeFactory`
903
873
  - `ContainerRuntimeFactoryWithDefaultDataStore`
904
874
  - `RuntimeFactory`
@@ -976,7 +946,6 @@ Dependency updates only.
976
946
 
977
947
  - The `@fluidframework/garbage-collector` package was deprecated in version 2.0.0-internal.4.1.0. [8b242fdc79](https://github.com/microsoft/FluidFramework/commits/8b242fdc796714cf1da9ad3f90d02efb122af0c2)
978
948
  It has now been removed with the following functions, interfaces, and types in it.
979
-
980
949
  - `cloneGCData`
981
950
  - `concatGarbageCollectionData`
982
951
  - `concatGarbageCollectionStates`
@@ -992,7 +961,6 @@ Dependency updates only.
992
961
  - `unpackChildNodesUsedRoutes`
993
962
 
994
963
  - The following functions and classes were deprecated in previous releases and have been removed: [8b242fdc79](https://github.com/microsoft/FluidFramework/commits/8b242fdc796714cf1da9ad3f90d02efb122af0c2)
995
-
996
964
  - `PureDataObject.getFluidObjectFromDirectory`
997
965
  - `IProvideContainerRuntime` and its `IContainerRuntime` member.
998
966
  - `ContainerRuntime`'s `IProvideContainerRuntime` has also been removed.
@@ -1022,7 +990,6 @@ Dependency updates only.
1022
990
  - GC interfaces removed from runtime-definitions ([#14750](https://github.com/microsoft/FluidFramework/pull-requests/14750)) [60274eacab](https://github.com/microsoft/FluidFramework/commits/60274eacabf14d42f52f6ad1c2f64356e64ba1a2)
1023
991
 
1024
992
  The following interfaces available in `@fluidframework/runtime-definitions` are internal implementation details and have been deprecated for public use. They will be removed in an upcoming release.
1025
-
1026
993
  - `IGarbageCollectionNodeData`
1027
994
  - `IGarbageCollectionState`
1028
995
  - `IGarbageCollectionSnapshotData`
@@ -1038,7 +1005,6 @@ Dependency updates only.
1038
1005
 
1039
1006
  This option will change a couple of expectations around message structure and runtime layer expectations. Only enable this option after testing
1040
1007
  and verifying that the following expectation changes won't have any effects:
1041
-
1042
1008
  - batch messages observed at the runtime layer will not match messages seen at the loader layer
1043
1009
  - messages within the same batch will have the same sequence number
1044
1010
  - client sequence numbers on batch messages can only be used to order messages with the same sequenceNumber
@@ -1057,7 +1023,6 @@ Dependency updates only.
1057
1023
  The `@fluidframework/garbage-collector` package is deprecated with the following functions, interfaces, and types in it.
1058
1024
  These are internal implementation details and have been deprecated for public use. They will be removed in an upcoming
1059
1025
  release.
1060
-
1061
1026
  - `cloneGCData`
1062
1027
  - `concatGarbageCollectionData`
1063
1028
  - `concatGarbageCollectionStates`
Binary file
@@ -261,7 +261,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
261
261
  // back-compat: Remove the TaggedLoggerAdapter fallback once all the host are using loader > 0.45
262
262
  const backCompatContext = context;
263
263
  const passLogger = backCompatContext.taggedLogger ??
264
- // eslint-disable-next-line import/no-deprecated
264
+ // eslint-disable-next-line import-x/no-deprecated
265
265
  new internal_8.TaggedLoggerAdapter(backCompatContext.logger);
266
266
  const logger = (0, internal_8.createChildLogger)({
267
267
  logger: passLogger,