@fluidframework/container-runtime 2.72.0 → 2.74.0-365691
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/CHANGELOG.md +4 -0
- package/container-runtime.test-files.tar +0 -0
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +1 -0
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/containerCompatibility.d.ts.map +1 -1
- package/dist/containerCompatibility.js +8 -2
- package/dist/containerCompatibility.js.map +1 -1
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +3 -1
- package/dist/containerRuntime.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/runtimeLayerCompatState.d.ts +1 -1
- package/dist/summary/documentSchema.d.ts +3 -1
- package/dist/summary/documentSchema.d.ts.map +1 -1
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +1 -0
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/containerCompatibility.d.ts.map +1 -1
- package/lib/containerCompatibility.js +9 -3
- package/lib/containerCompatibility.js.map +1 -1
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +4 -2
- package/lib/containerRuntime.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/runtimeLayerCompatState.d.ts +1 -1
- package/lib/summary/documentSchema.d.ts +3 -1
- package/lib/summary/documentSchema.d.ts.map +1 -1
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/package.json +19 -19
- package/src/blobManager/blobManager.ts +1 -0
- package/src/containerCompatibility.ts +97 -91
- package/src/containerRuntime.ts +4 -2
- package/src/packageVersion.ts +1 -1
- package/src/summary/documentSchema.ts +3 -1
- package/src/summary/orderedClientElection.ts +1 -1
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
configValueToMinVersionForCollab,
|
|
12
12
|
getConfigsForMinVersionForCollab,
|
|
13
|
-
|
|
13
|
+
validateConfigMapOverrides,
|
|
14
14
|
type ConfigMap,
|
|
15
15
|
type ConfigValidationMap,
|
|
16
16
|
} from "@fluidframework/runtime-utils/internal";
|
|
@@ -101,60 +101,66 @@ export type RuntimeOptionKeysThatRequireExplicitSchemaControl = keyof Omit<
|
|
|
101
101
|
* default value for `enableGroupedBatching` will be true because clients running 2.0 or later will be able to understand the format changes associated
|
|
102
102
|
* with the batching feature.
|
|
103
103
|
*/
|
|
104
|
-
const runtimeOptionsAffectingDocSchemaConfigMap =
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
104
|
+
const runtimeOptionsAffectingDocSchemaConfigMap: ConfigMap<RuntimeOptionsAffectingDocSchema> =
|
|
105
|
+
{
|
|
106
|
+
enableGroupedBatching: {
|
|
107
|
+
"1.0.0": false,
|
|
108
|
+
"2.0.0-defaults": true,
|
|
109
|
+
},
|
|
110
|
+
compressionOptions: {
|
|
111
|
+
"1.0.0": disabledCompressionConfig,
|
|
112
|
+
"2.0.0-defaults": enabledCompressionConfig,
|
|
113
|
+
},
|
|
114
|
+
enableRuntimeIdCompressor: {
|
|
115
|
+
// For IdCompressorMode, `undefined` represents a logical state (off).
|
|
116
|
+
// However, to satisfy the Required<> constraint while
|
|
117
|
+
// `exactOptionalPropertyTypes` is `false` (TODO: AB#8215), we need
|
|
118
|
+
// to have it defined, so we trick the type checker here.
|
|
119
|
+
"1.0.0": undefined,
|
|
120
|
+
// We do not yet want to enable idCompressor by default since it will
|
|
121
|
+
// increase bundle sizes, and not all customers will benefit from it.
|
|
122
|
+
// Therefore, we will require customers to explicitly enable it. We
|
|
123
|
+
// are keeping it as a DocSchema affecting option for now as this may
|
|
124
|
+
// change in the future.
|
|
125
|
+
},
|
|
126
|
+
explicitSchemaControl: {
|
|
127
|
+
"1.0.0": false,
|
|
128
|
+
// This option's intention is to prevent 1.x clients from joining sessions
|
|
129
|
+
// when enabled. This is set to true when the minVersionForCollab is set
|
|
130
|
+
// to >=2.0.0 (explicitly). This is different than other 2.0 defaults
|
|
131
|
+
// because it was not enabled by default prior to the implementation of
|
|
132
|
+
// `minVersionForCollab`.
|
|
133
|
+
// `defaultMinVersionForCollab` is set to "2.0.0-defaults" which "2.0.0"
|
|
134
|
+
// does not satisfy to avoiding enabling this option by default as of
|
|
135
|
+
// `minVersionForCollab` introduction, which could be unexpected.
|
|
136
|
+
// Only enable as a default when `minVersionForCollab` is specified at
|
|
137
|
+
// 2.0.0+.
|
|
138
|
+
"2.0.0": true,
|
|
139
|
+
},
|
|
140
|
+
flushMode: {
|
|
141
|
+
// Note: 1.x clients are compatible with TurnBased flushing, but here we elect to remain on Immediate flush mode
|
|
142
|
+
// as a work-around for inability to send batches larger than 1Mb. Immediate flushing keeps batches smaller as
|
|
143
|
+
// fewer messages will be included per flush.
|
|
144
|
+
"1.0.0": FlushMode.Immediate,
|
|
145
|
+
"2.0.0-defaults": FlushMode.TurnBased,
|
|
146
|
+
},
|
|
147
|
+
gcOptions: {
|
|
148
|
+
"1.0.0": {},
|
|
149
|
+
// Although sweep is supported in 2.x, it is disabled by default until minVersionForCollab>=3.0.0 to be extra safe.
|
|
150
|
+
// Note that enabling this is a significant change, that should likely be announced in the relevant version:
|
|
151
|
+
// It would be bad if this simple caused the enablement when when the current package version passed this point without anyone being aware.
|
|
152
|
+
// This is configuration targeting a future versions, which is not supported.
|
|
153
|
+
// TODO: when preparing 3.0 (or at some later point), consider enabling this by default for clients 3.0 or newer
|
|
154
|
+
// (and add user facing documentation indicating this is enabled by that version).
|
|
155
|
+
// "3.0.0": { enableGCSweep: true },
|
|
156
|
+
},
|
|
157
|
+
createBlobPayloadPending: {
|
|
158
|
+
// This feature is new and disabled by default. In the future we will enable it by default, but we have not
|
|
159
|
+
// closed on the version where that will happen yet. Probably a .10 release since blob functionality is not
|
|
160
|
+
// exposed on the `@public` API surface.
|
|
161
|
+
"1.0.0": undefined,
|
|
162
|
+
},
|
|
163
|
+
};
|
|
158
164
|
|
|
159
165
|
/**
|
|
160
166
|
* Keys of {@link ContainerRuntimeOptionsInternal} that require explicitSchemaControl to be enabled.
|
|
@@ -169,37 +175,39 @@ export const runtimeOptionKeysThatRequireExplicitSchemaControl = (
|
|
|
169
175
|
);
|
|
170
176
|
}) as RuntimeOptionKeysThatRequireExplicitSchemaControl[];
|
|
171
177
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
[
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
[
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
[
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
[
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
[
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
[
|
|
201
|
-
|
|
202
|
-
|
|
178
|
+
// A lot of the information in this seems redundant with whats defined above. Might be nice to combine them somehow.
|
|
179
|
+
const runtimeOptionsAffectingDocSchemaConfigValidationMap: ConfigValidationMap<RuntimeOptionsAffectingDocSchema> =
|
|
180
|
+
{
|
|
181
|
+
enableGroupedBatching: configValueToMinVersionForCollab([
|
|
182
|
+
[false, "1.0.0"],
|
|
183
|
+
[true, "2.0.0-defaults"],
|
|
184
|
+
]),
|
|
185
|
+
compressionOptions: configValueToMinVersionForCollab([
|
|
186
|
+
[{ ...disabledCompressionConfig }, "1.0.0"],
|
|
187
|
+
[{ ...enabledCompressionConfig }, "2.0.0-defaults"],
|
|
188
|
+
]),
|
|
189
|
+
enableRuntimeIdCompressor: configValueToMinVersionForCollab([
|
|
190
|
+
[undefined, "1.0.0"],
|
|
191
|
+
["on", "2.0.0-defaults"],
|
|
192
|
+
["delayed", "2.0.0-defaults"],
|
|
193
|
+
]),
|
|
194
|
+
explicitSchemaControl: configValueToMinVersionForCollab([
|
|
195
|
+
[false, "1.0.0"],
|
|
196
|
+
[true, "2.0.0-defaults"],
|
|
197
|
+
]),
|
|
198
|
+
flushMode: configValueToMinVersionForCollab([
|
|
199
|
+
[FlushMode.Immediate, "1.0.0"],
|
|
200
|
+
[FlushMode.TurnBased, "2.0.0-defaults"],
|
|
201
|
+
]),
|
|
202
|
+
gcOptions: configValueToMinVersionForCollab([
|
|
203
|
+
[{ enableGCSweep: undefined }, "1.0.0"],
|
|
204
|
+
[{ enableGCSweep: true }, "2.0.0-defaults"],
|
|
205
|
+
]),
|
|
206
|
+
createBlobPayloadPending: configValueToMinVersionForCollab([
|
|
207
|
+
[undefined, "1.0.0"],
|
|
208
|
+
[true, "2.40.0"],
|
|
209
|
+
]),
|
|
210
|
+
};
|
|
203
211
|
|
|
204
212
|
/**
|
|
205
213
|
* Returns the default RuntimeOptionsAffectingDocSchema configuration for a given minVersionForCollab.
|
|
@@ -210,9 +218,7 @@ export function getMinVersionForCollabDefaults(
|
|
|
210
218
|
return getConfigsForMinVersionForCollab(
|
|
211
219
|
minVersionForCollab,
|
|
212
220
|
runtimeOptionsAffectingDocSchemaConfigMap,
|
|
213
|
-
|
|
214
|
-
// ConfigMap should be restructured to provide RuntimeOptionsAffectingDocSchema guarantee.
|
|
215
|
-
) as RuntimeOptionsAffectingDocSchema;
|
|
221
|
+
);
|
|
216
222
|
}
|
|
217
223
|
|
|
218
224
|
/**
|
|
@@ -224,9 +230,9 @@ export function validateRuntimeOptions(
|
|
|
224
230
|
minVersionForCollab: MinimumVersionForCollab,
|
|
225
231
|
runtimeOptions: Partial<ContainerRuntimeOptionsInternal>,
|
|
226
232
|
): void {
|
|
227
|
-
|
|
233
|
+
validateConfigMapOverrides<RuntimeOptionsAffectingDocSchema>(
|
|
228
234
|
minVersionForCollab,
|
|
229
|
-
runtimeOptions
|
|
235
|
+
runtimeOptions,
|
|
230
236
|
runtimeOptionsAffectingDocSchemaConfigValidationMap,
|
|
231
237
|
);
|
|
232
238
|
}
|
package/src/containerRuntime.ts
CHANGED
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
isValidMinVersionForCollab,
|
|
144
144
|
RequestParser,
|
|
145
145
|
RuntimeHeaders,
|
|
146
|
-
|
|
146
|
+
validateMinimumVersionForCollab,
|
|
147
147
|
seqFromTree,
|
|
148
148
|
TelemetryContext,
|
|
149
149
|
} from "@fluidframework/runtime-utils/internal";
|
|
@@ -1219,6 +1219,7 @@ export class ContainerRuntime
|
|
|
1219
1219
|
createBlobPayloadPending,
|
|
1220
1220
|
};
|
|
1221
1221
|
|
|
1222
|
+
validateMinimumVersionForCollab(updatedMinVersionForCollab);
|
|
1222
1223
|
const runtime = new containerRuntimeCtor(
|
|
1223
1224
|
context,
|
|
1224
1225
|
registry,
|
|
@@ -1236,7 +1237,7 @@ export class ContainerRuntime
|
|
|
1236
1237
|
documentSchemaController,
|
|
1237
1238
|
featureGatesForTelemetry,
|
|
1238
1239
|
provideEntryPoint,
|
|
1239
|
-
|
|
1240
|
+
updatedMinVersionForCollab,
|
|
1240
1241
|
requestHandler,
|
|
1241
1242
|
undefined, // summaryConfiguration
|
|
1242
1243
|
recentBatchInfo,
|
|
@@ -4348,6 +4349,7 @@ export class ContainerRuntime
|
|
|
4348
4349
|
if (lastAckedContext !== this.lastAckedSummaryContext) {
|
|
4349
4350
|
return {
|
|
4350
4351
|
continue: false,
|
|
4352
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
4351
4353
|
error: `Last summary changed while summarizing. ${this.lastAckedSummaryContext} !== ${lastAckedContext}`,
|
|
4352
4354
|
};
|
|
4353
4355
|
}
|
package/src/packageVersion.ts
CHANGED
|
@@ -107,8 +107,10 @@ export interface IDocumentSchemaInfo {
|
|
|
107
107
|
* See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams} for additional details on `minVersionForCollab`.
|
|
108
108
|
*
|
|
109
109
|
* @remarks
|
|
110
|
-
* We use `SemanticVersion` instead of `MinimumVersionForCollab` since we may open future documents
|
|
110
|
+
* We use `SemanticVersion` instead of `MinimumVersionForCollab` since we may open future documents with a
|
|
111
111
|
* minVersionForCollab version that `MinimumVersionForCollab` does not support.
|
|
112
|
+
* Note that in such a case (where minVersionForCollab is not a valid `MinimumVersionForCollab`),
|
|
113
|
+
* loading the document might not work since this version of the runtime may not support it.
|
|
112
114
|
*/
|
|
113
115
|
minVersionForCollab: SemanticVersion;
|
|
114
116
|
}
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import { summarizerClientType } from "./summarizerTypes.js";
|
|
28
28
|
|
|
29
29
|
// helper types for recursive readonly.
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
31
31
|
export type ImmutablePrimitives = undefined | null | boolean | string | number | Function;
|
|
32
32
|
export type Immutable<T> = T extends ImmutablePrimitives
|
|
33
33
|
? T
|