@fluidframework/container-loader 0.58.1001 → 0.58.2001
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/dist/connectionManager.d.ts.map +1 -1
- package/dist/connectionManager.js +9 -12
- package/dist/connectionManager.js.map +1 -1
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +5 -0
- package/dist/container.js.map +1 -1
- package/dist/containerContext.d.ts +1 -1
- package/dist/containerContext.d.ts.map +1 -1
- package/dist/containerContext.js +2 -2
- package/dist/containerContext.js.map +1 -1
- package/dist/deltaManager.d.ts.map +1 -1
- package/dist/deltaManager.js +6 -17
- package/dist/deltaManager.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/retriableDocumentStorageService.d.ts.map +1 -1
- package/dist/retriableDocumentStorageService.js +1 -0
- package/dist/retriableDocumentStorageService.js.map +1 -1
- package/lib/connectionManager.d.ts.map +1 -1
- package/lib/connectionManager.js +10 -13
- package/lib/connectionManager.js.map +1 -1
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +5 -0
- package/lib/container.js.map +1 -1
- package/lib/containerContext.d.ts +1 -1
- package/lib/containerContext.d.ts.map +1 -1
- package/lib/containerContext.js +2 -2
- package/lib/containerContext.js.map +1 -1
- package/lib/deltaManager.d.ts.map +1 -1
- package/lib/deltaManager.js +6 -17
- package/lib/deltaManager.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/retriableDocumentStorageService.d.ts.map +1 -1
- package/lib/retriableDocumentStorageService.js +1 -0
- package/lib/retriableDocumentStorageService.js.map +1 -1
- package/package.json +12 -8
- package/src/connectionManager.ts +15 -17
- package/src/container.ts +5 -0
- package/src/containerContext.ts +11 -11
- package/src/deltaManager.ts +4 -17
- package/src/packageVersion.ts +1 -1
- package/src/retriableDocumentStorageService.ts +1 -0
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-loader",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.2001",
|
|
4
4
|
"description": "Fluid container loader",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
|
-
"repository":
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/microsoft/FluidFramework.git",
|
|
9
|
+
"directory": "packages/loader/container-loader"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "Microsoft and contributors",
|
|
9
13
|
"sideEffects": false,
|
|
@@ -59,13 +63,13 @@
|
|
|
59
63
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
60
64
|
"@fluidframework/common-utils": "^0.32.1",
|
|
61
65
|
"@fluidframework/container-definitions": "^0.47.1000",
|
|
62
|
-
"@fluidframework/container-utils": "^0.58.
|
|
66
|
+
"@fluidframework/container-utils": "^0.58.2001",
|
|
63
67
|
"@fluidframework/core-interfaces": "^0.42.0",
|
|
64
68
|
"@fluidframework/driver-definitions": "^0.45.1000",
|
|
65
|
-
"@fluidframework/driver-utils": "^0.58.
|
|
69
|
+
"@fluidframework/driver-utils": "^0.58.2001",
|
|
66
70
|
"@fluidframework/protocol-base": "^0.1035.1000",
|
|
67
71
|
"@fluidframework/protocol-definitions": "^0.1027.1000",
|
|
68
|
-
"@fluidframework/telemetry-utils": "^0.58.
|
|
72
|
+
"@fluidframework/telemetry-utils": "^0.58.2001",
|
|
69
73
|
"abort-controller": "^3.0.0",
|
|
70
74
|
"double-ended-queue": "^2.1.0-0",
|
|
71
75
|
"lodash": "^4.17.21",
|
|
@@ -73,9 +77,9 @@
|
|
|
73
77
|
},
|
|
74
78
|
"devDependencies": {
|
|
75
79
|
"@fluidframework/build-common": "^0.23.0",
|
|
76
|
-
"@fluidframework/eslint-config-fluid": "^0.
|
|
77
|
-
"@fluidframework/mocha-test-setup": "^0.58.
|
|
78
|
-
"@fluidframework/test-loader-utils": "^0.58.
|
|
80
|
+
"@fluidframework/eslint-config-fluid": "^0.27.0",
|
|
81
|
+
"@fluidframework/mocha-test-setup": "^0.58.2001",
|
|
82
|
+
"@fluidframework/test-loader-utils": "^0.58.2001",
|
|
79
83
|
"@microsoft/api-extractor": "^7.16.1",
|
|
80
84
|
"@rushstack/eslint-config": "^2.5.1",
|
|
81
85
|
"@types/double-ended-queue": "^2.1.0",
|
package/src/connectionManager.ts
CHANGED
|
@@ -29,9 +29,9 @@ import {
|
|
|
29
29
|
createGenericNetworkError,
|
|
30
30
|
getRetryDelayFromError,
|
|
31
31
|
IAnyDriverError,
|
|
32
|
-
logNetworkFailure,
|
|
33
32
|
waitForConnectedState,
|
|
34
33
|
DeltaStreamConnectionForbiddenError,
|
|
34
|
+
logNetworkFailure,
|
|
35
35
|
} from "@fluidframework/driver-utils";
|
|
36
36
|
import {
|
|
37
37
|
ConnectionMode,
|
|
@@ -490,18 +490,15 @@ export class ConnectionManager implements IConnectionManager {
|
|
|
490
490
|
throw error;
|
|
491
491
|
}
|
|
492
492
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
},
|
|
503
|
-
origError);
|
|
504
|
-
}
|
|
493
|
+
logNetworkFailure(
|
|
494
|
+
this.logger,
|
|
495
|
+
{
|
|
496
|
+
attempts: connectRepeatCount,
|
|
497
|
+
delay: delayMs, // milliseconds
|
|
498
|
+
eventName: "DeltaConnectionFailureToConnect",
|
|
499
|
+
duration: TelemetryLogger.formatTick(performance.now() - connectStartTime),
|
|
500
|
+
},
|
|
501
|
+
origError);
|
|
505
502
|
|
|
506
503
|
lastError = origError;
|
|
507
504
|
|
|
@@ -515,9 +512,10 @@ export class ConnectionManager implements IConnectionManager {
|
|
|
515
512
|
}
|
|
516
513
|
}
|
|
517
514
|
|
|
518
|
-
// If we retried more than once, log an event about how long it took
|
|
515
|
+
// If we retried more than once, log an event about how long it took (this will not log to error table)
|
|
519
516
|
if (connectRepeatCount > 1) {
|
|
520
|
-
|
|
517
|
+
logNetworkFailure(
|
|
518
|
+
this.logger,
|
|
521
519
|
{
|
|
522
520
|
eventName: "MultipleDeltaConnectionFailures",
|
|
523
521
|
attempts: connectRepeatCount,
|
|
@@ -856,9 +854,9 @@ export class ConnectionManager implements IConnectionManager {
|
|
|
856
854
|
// Always connect in write mode after getting nacked.
|
|
857
855
|
private readonly nackHandler = (documentId: string, messages: INack[]) => {
|
|
858
856
|
const message = messages[0];
|
|
859
|
-
if (this._readonlyPermissions) {
|
|
857
|
+
if (this._readonlyPermissions === true) {
|
|
860
858
|
this.props.closeHandler(createWriteError("writeOnReadOnlyDocument", { driverVersion: undefined }));
|
|
861
|
-
return
|
|
859
|
+
return;
|
|
862
860
|
}
|
|
863
861
|
|
|
864
862
|
const reconnectInfo = getNackReconnectInfo(message.content);
|
package/src/container.ts
CHANGED
|
@@ -258,6 +258,7 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
|
|
|
258
258
|
const mode: IContainerLoadMode = loadOptions.loadMode ?? defaultMode;
|
|
259
259
|
|
|
260
260
|
const onClosed = (err?: ICriticalContainerError) => {
|
|
261
|
+
// pre-0.58 error message: containerClosedWithoutErrorDuringLoad
|
|
261
262
|
reject(err ?? new GenericError("Container closed without error during load"));
|
|
262
263
|
};
|
|
263
264
|
container.on("closed", onClosed);
|
|
@@ -780,6 +781,7 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
|
|
|
780
781
|
public async attach(request: IRequest): Promise<void> {
|
|
781
782
|
await PerformanceEvent.timedExecAsync(this.mc.logger, { eventName: "Attach" }, async () => {
|
|
782
783
|
if (this._lifecycleState !== "loaded") {
|
|
784
|
+
// pre-0.58 error message: containerNotValidForAttach
|
|
783
785
|
throw new UsageError(`The Container is not in a valid state for attach [${this._lifecycleState}]`);
|
|
784
786
|
}
|
|
785
787
|
|
|
@@ -1014,6 +1016,7 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
|
|
|
1014
1016
|
return;
|
|
1015
1017
|
}
|
|
1016
1018
|
|
|
1019
|
+
// pre-0.58 error message: existingContextDoesNotSatisfyIncomingProposal
|
|
1017
1020
|
this.close(new GenericError("Existing context does not satisfy incoming proposal"));
|
|
1018
1021
|
}
|
|
1019
1022
|
|
|
@@ -1640,8 +1643,10 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
|
|
|
1640
1643
|
const client: ILocalSequencedClient | undefined =
|
|
1641
1644
|
this.getQuorum().getMember(message.clientId);
|
|
1642
1645
|
if (client === undefined && message.type !== MessageType.ClientJoin) {
|
|
1646
|
+
// pre-0.58 error message: messageClientIdMissingFromQuorum
|
|
1643
1647
|
errorMsg = "Remote message's clientId is missing from the quorum";
|
|
1644
1648
|
} else if (client?.shouldHaveLeft === true && message.type !== MessageType.NoOp) {
|
|
1649
|
+
// pre-0.58 error message: messageClientIdShouldHaveLeft
|
|
1645
1650
|
errorMsg = "Remote message's clientId already should have left";
|
|
1646
1651
|
}
|
|
1647
1652
|
if (errorMsg !== undefined) {
|
package/src/containerContext.ts
CHANGED
|
@@ -4,15 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { ITelemetryLogger } from "@fluidframework/common-definitions";
|
|
7
|
-
import {
|
|
8
|
-
IFluidObject,
|
|
9
|
-
IRequest,
|
|
10
|
-
IResponse,
|
|
11
|
-
IFluidCodeDetails,
|
|
12
|
-
IFluidCodeDetailsComparer,
|
|
13
|
-
IProvideFluidCodeDetailsComparer,
|
|
14
|
-
FluidObject,
|
|
15
|
-
} from "@fluidframework/core-interfaces";
|
|
7
|
+
import { assert, LazyPromise } from "@fluidframework/common-utils";
|
|
16
8
|
import {
|
|
17
9
|
IAudience,
|
|
18
10
|
IContainerContext,
|
|
@@ -27,7 +19,17 @@ import {
|
|
|
27
19
|
ICodeLoader,
|
|
28
20
|
IProvideRuntimeFactory,
|
|
29
21
|
} from "@fluidframework/container-definitions";
|
|
22
|
+
import {
|
|
23
|
+
IFluidObject,
|
|
24
|
+
IRequest,
|
|
25
|
+
IResponse,
|
|
26
|
+
IFluidCodeDetails,
|
|
27
|
+
IFluidCodeDetailsComparer,
|
|
28
|
+
IProvideFluidCodeDetailsComparer,
|
|
29
|
+
FluidObject,
|
|
30
|
+
} from "@fluidframework/core-interfaces";
|
|
30
31
|
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
32
|
+
import { isFluidResolvedUrl } from "@fluidframework/driver-utils";
|
|
31
33
|
import {
|
|
32
34
|
IClientConfiguration,
|
|
33
35
|
IClientDetails,
|
|
@@ -42,9 +44,7 @@ import {
|
|
|
42
44
|
MessageType,
|
|
43
45
|
} from "@fluidframework/protocol-definitions";
|
|
44
46
|
import { PerformanceEvent } from "@fluidframework/telemetry-utils";
|
|
45
|
-
import { assert, LazyPromise } from "@fluidframework/common-utils";
|
|
46
47
|
import { Container } from "./container";
|
|
47
|
-
import { isFluidResolvedUrl } from "@fluidframework/driver-utils";
|
|
48
48
|
import { ICodeDetailsLoader, IFluidModuleWithDetails } from "./loader";
|
|
49
49
|
|
|
50
50
|
const PackageNotFactoryError = "Code package does not implement IRuntimeFactory";
|
package/src/deltaManager.ts
CHANGED
|
@@ -53,7 +53,6 @@ import {
|
|
|
53
53
|
IConnectionManagerFactoryArgs,
|
|
54
54
|
IConnectionManager,
|
|
55
55
|
} from "./contracts";
|
|
56
|
-
import { TelemetryDataTag } from "@fluidframework/telemetry-utils";
|
|
57
56
|
|
|
58
57
|
export interface IConnectionArgs {
|
|
59
58
|
mode?: ConnectionMode;
|
|
@@ -184,7 +183,6 @@ export class DeltaManager<TConnectionManager extends IConnectionManager>
|
|
|
184
183
|
public get clientDetails() { return this.connectionManager.clientDetails; }
|
|
185
184
|
|
|
186
185
|
public submit(type: MessageType, contents: any, batch = false, metadata?: any) {
|
|
187
|
-
|
|
188
186
|
const messagePartial: Omit<IDocumentMessage, "clientSequenceNumber"> = {
|
|
189
187
|
contents: JSON.stringify(contents),
|
|
190
188
|
metadata,
|
|
@@ -571,21 +569,7 @@ export class DeltaManager<TConnectionManager extends IConnectionManager>
|
|
|
571
569
|
}
|
|
572
570
|
|
|
573
571
|
private disconnectHandler(reason: string) {
|
|
574
|
-
|
|
575
|
-
// Behavior is not well defined here RE batches across connections / disconnect.
|
|
576
|
-
// DeltaManager overall policy - drop all ops on disconnection and rely on
|
|
577
|
-
// container runtime to deal with resubmitting any ops that did not make it through.
|
|
578
|
-
// So drop them, but also raise error event to look into details.
|
|
579
|
-
this.logger.sendTelemetryEvent({
|
|
580
|
-
eventName: "OpenBatchOnDisconnect",
|
|
581
|
-
length: this.messageBuffer.length,
|
|
582
|
-
reason: {
|
|
583
|
-
value: reason,
|
|
584
|
-
tag: TelemetryDataTag.PackageData,
|
|
585
|
-
}
|
|
586
|
-
});
|
|
587
|
-
this.messageBuffer.length = 0;
|
|
588
|
-
}
|
|
572
|
+
this.messageBuffer.length = 0;
|
|
589
573
|
this.emit("disconnect", reason);
|
|
590
574
|
}
|
|
591
575
|
|
|
@@ -726,6 +710,7 @@ export class DeltaManager<TConnectionManager extends IConnectionManager>
|
|
|
726
710
|
// This looks like a data corruption but the culprit has been found instead
|
|
727
711
|
// to be the file being overwritten in storage. See PR #5882.
|
|
728
712
|
const error = new NonRetryableError(
|
|
713
|
+
// pre-0.58 error message: twoMessagesWithSameSeqNumAndDifferentPayload
|
|
729
714
|
"Found two messages with the same sequenceNumber but different payloads",
|
|
730
715
|
DriverErrorType.fileOverwrittenInStorage,
|
|
731
716
|
{
|
|
@@ -780,6 +765,7 @@ export class DeltaManager<TConnectionManager extends IConnectionManager>
|
|
|
780
765
|
|
|
781
766
|
// Watch the minimum sequence number and be ready to update as needed
|
|
782
767
|
if (this.minSequenceNumber > message.minimumSequenceNumber) {
|
|
768
|
+
// pre-0.58 error message: msnMovesBackwards
|
|
783
769
|
throw new DataCorruptionError("Found a lower minimumSequenceNumber (msn) than previously recorded", {
|
|
784
770
|
...extractSafePropertiesFromMessage(message),
|
|
785
771
|
clientId: this.connectionManager.clientId,
|
|
@@ -788,6 +774,7 @@ export class DeltaManager<TConnectionManager extends IConnectionManager>
|
|
|
788
774
|
this.minSequenceNumber = message.minimumSequenceNumber;
|
|
789
775
|
|
|
790
776
|
if (message.sequenceNumber !== this.lastProcessedSequenceNumber + 1) {
|
|
777
|
+
// pre-0.58 error message: nonSequentialSequenceNumber
|
|
791
778
|
throw new DataCorruptionError("Found a non-Sequential sequenceNumber", {
|
|
792
779
|
...extractSafePropertiesFromMessage(message),
|
|
793
780
|
clientId: this.connectionManager.clientId,
|
package/src/packageVersion.ts
CHANGED
|
@@ -108,6 +108,7 @@ export class RetriableDocumentStorageService implements IDocumentStorageService,
|
|
|
108
108
|
|
|
109
109
|
private checkStorageDisposed() {
|
|
110
110
|
if (this._disposed) {
|
|
111
|
+
// pre-0.58 error message: storageServiceDisposedCannotRetry
|
|
111
112
|
throw new GenericError("Storage Service is disposed. Cannot retry", { canRetry: false });
|
|
112
113
|
}
|
|
113
114
|
return undefined;
|