@fluidframework/container-loader 2.0.0-internal.5.3.2 → 2.0.0-internal.5.4.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +6 -3
  3. package/dist/audience.d.ts +1 -0
  4. package/dist/audience.d.ts.map +1 -1
  5. package/dist/audience.js +3 -1
  6. package/dist/audience.js.map +1 -1
  7. package/dist/connectionManager.d.ts.map +1 -1
  8. package/dist/connectionManager.js +6 -11
  9. package/dist/connectionManager.js.map +1 -1
  10. package/dist/container.d.ts +2 -3
  11. package/dist/container.d.ts.map +1 -1
  12. package/dist/container.js +57 -75
  13. package/dist/container.js.map +1 -1
  14. package/dist/debugLogger.d.ts +30 -0
  15. package/dist/debugLogger.d.ts.map +1 -0
  16. package/dist/debugLogger.js +96 -0
  17. package/dist/debugLogger.js.map +1 -0
  18. package/dist/deltaManager.d.ts +0 -1
  19. package/dist/deltaManager.d.ts.map +1 -1
  20. package/dist/deltaManager.js +17 -9
  21. package/dist/deltaManager.js.map +1 -1
  22. package/dist/loader.d.ts.map +1 -1
  23. package/dist/loader.js +16 -5
  24. package/dist/loader.js.map +1 -1
  25. package/dist/packageVersion.d.ts +1 -1
  26. package/dist/packageVersion.js +1 -1
  27. package/dist/packageVersion.js.map +1 -1
  28. package/dist/quorum.d.ts +4 -1
  29. package/dist/quorum.d.ts.map +1 -1
  30. package/dist/quorum.js +1 -13
  31. package/dist/quorum.js.map +1 -1
  32. package/lib/audience.d.ts +1 -0
  33. package/lib/audience.d.ts.map +1 -1
  34. package/lib/audience.js +3 -1
  35. package/lib/audience.js.map +1 -1
  36. package/lib/connectionManager.d.ts.map +1 -1
  37. package/lib/connectionManager.js +7 -9
  38. package/lib/connectionManager.js.map +1 -1
  39. package/lib/container.d.ts +2 -3
  40. package/lib/container.d.ts.map +1 -1
  41. package/lib/container.js +59 -77
  42. package/lib/container.js.map +1 -1
  43. package/lib/debugLogger.d.ts +30 -0
  44. package/lib/debugLogger.d.ts.map +1 -0
  45. package/lib/debugLogger.js +92 -0
  46. package/lib/debugLogger.js.map +1 -0
  47. package/lib/deltaManager.d.ts +0 -1
  48. package/lib/deltaManager.d.ts.map +1 -1
  49. package/lib/deltaManager.js +15 -4
  50. package/lib/deltaManager.js.map +1 -1
  51. package/lib/loader.d.ts.map +1 -1
  52. package/lib/loader.js +16 -5
  53. package/lib/loader.js.map +1 -1
  54. package/lib/packageVersion.d.ts +1 -1
  55. package/lib/packageVersion.js +1 -1
  56. package/lib/packageVersion.js.map +1 -1
  57. package/lib/quorum.d.ts +4 -1
  58. package/lib/quorum.d.ts.map +1 -1
  59. package/lib/quorum.js +0 -11
  60. package/lib/quorum.js.map +1 -1
  61. package/package.json +12 -12
  62. package/src/audience.ts +6 -0
  63. package/src/connectionManager.ts +7 -12
  64. package/src/container.ts +65 -92
  65. package/src/debugLogger.ts +113 -0
  66. package/src/deltaManager.ts +28 -4
  67. package/src/loader.ts +16 -7
  68. package/src/packageVersion.ts +1 -1
  69. package/src/quorum.ts +0 -10
package/dist/container.js CHANGED
@@ -160,7 +160,6 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
160
160
  this.inboundQueuePausedFromInit = true;
161
161
  this.firstConnection = true;
162
162
  this.connectionTransitionTimes = [];
163
- this.messageCountAfterDisconnection = 0;
164
163
  this.attachStarted = false;
165
164
  this._dirtyContainer = false;
166
165
  this.savedOps = [];
@@ -207,42 +206,45 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
207
206
  const clientType = `${interactive ? "interactive" : "noninteractive"}${type !== undefined && type !== "" ? `/${type}` : ""}`;
208
207
  // Need to use the property getter for docId because for detached flow we don't have the docId initially.
209
208
  // We assign the id later so property getter is used.
210
- this.subLogger = telemetry_utils_1.ChildLogger.create(subLogger, undefined, {
211
- all: {
212
- clientType,
213
- containerId: (0, uuid_1.v4)(),
214
- docId: () => { var _a; return (_a = this.resolvedUrl) === null || _a === void 0 ? void 0 : _a.id; },
215
- containerAttachState: () => this._attachState,
216
- containerLifecycleState: () => this._lifecycleState,
217
- containerConnectionState: () => connectionState_1.ConnectionState[this.connectionState],
218
- serializedContainer: pendingLocalState !== undefined,
219
- },
220
- // we need to be judicious with our logging here to avoid generating too much data
221
- // all data logged here should be broadly applicable, and not specific to a
222
- // specific error or class of errors
223
- error: {
224
- // load information to associate errors with the specific load point
225
- dmInitialSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.initialSequenceNumber; },
226
- dmLastProcessedSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.lastSequenceNumber; },
227
- dmLastKnownSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.lastKnownSeqNumber; },
228
- containerLoadedFromVersionId: () => { var _a; return (_a = this._loadedFromVersion) === null || _a === void 0 ? void 0 : _a.id; },
229
- containerLoadedFromVersionDate: () => { var _a; return (_a = this._loadedFromVersion) === null || _a === void 0 ? void 0 : _a.date; },
230
- // message information to associate errors with the specific execution state
231
- // dmLastMsqSeqNumber: if present, same as dmLastProcessedSeqNumber
232
- dmLastMsqSeqNumber: () => { var _a, _b; return (_b = (_a = this.deltaManager) === null || _a === void 0 ? void 0 : _a.lastMessage) === null || _b === void 0 ? void 0 : _b.sequenceNumber; },
233
- dmLastMsqSeqTimestamp: () => { var _a, _b; return (_b = (_a = this.deltaManager) === null || _a === void 0 ? void 0 : _a.lastMessage) === null || _b === void 0 ? void 0 : _b.timestamp; },
234
- dmLastMsqSeqClientId: () => {
235
- var _a, _b, _c, _d;
236
- return ((_b = (_a = this.deltaManager) === null || _a === void 0 ? void 0 : _a.lastMessage) === null || _b === void 0 ? void 0 : _b.clientId) === null
237
- ? "null"
238
- : (_d = (_c = this.deltaManager) === null || _c === void 0 ? void 0 : _c.lastMessage) === null || _d === void 0 ? void 0 : _d.clientId;
209
+ this.subLogger = (0, telemetry_utils_1.createChildLogger)({
210
+ logger: subLogger,
211
+ properties: {
212
+ all: {
213
+ clientType,
214
+ containerId: (0, uuid_1.v4)(),
215
+ docId: () => { var _a; return (_a = this.resolvedUrl) === null || _a === void 0 ? void 0 : _a.id; },
216
+ containerAttachState: () => this._attachState,
217
+ containerLifecycleState: () => this._lifecycleState,
218
+ containerConnectionState: () => connectionState_1.ConnectionState[this.connectionState],
219
+ serializedContainer: pendingLocalState !== undefined,
220
+ },
221
+ // we need to be judicious with our logging here to avoid generating too much data
222
+ // all data logged here should be broadly applicable, and not specific to a
223
+ // specific error or class of errors
224
+ error: {
225
+ // load information to associate errors with the specific load point
226
+ dmInitialSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.initialSequenceNumber; },
227
+ dmLastProcessedSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.lastSequenceNumber; },
228
+ dmLastKnownSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.lastKnownSeqNumber; },
229
+ containerLoadedFromVersionId: () => { var _a; return (_a = this._loadedFromVersion) === null || _a === void 0 ? void 0 : _a.id; },
230
+ containerLoadedFromVersionDate: () => { var _a; return (_a = this._loadedFromVersion) === null || _a === void 0 ? void 0 : _a.date; },
231
+ // message information to associate errors with the specific execution state
232
+ // dmLastMsqSeqNumber: if present, same as dmLastProcessedSeqNumber
233
+ dmLastMsqSeqNumber: () => { var _a, _b; return (_b = (_a = this.deltaManager) === null || _a === void 0 ? void 0 : _a.lastMessage) === null || _b === void 0 ? void 0 : _b.sequenceNumber; },
234
+ dmLastMsqSeqTimestamp: () => { var _a, _b; return (_b = (_a = this.deltaManager) === null || _a === void 0 ? void 0 : _a.lastMessage) === null || _b === void 0 ? void 0 : _b.timestamp; },
235
+ dmLastMsqSeqClientId: () => {
236
+ var _a, _b, _c, _d;
237
+ return ((_b = (_a = this.deltaManager) === null || _a === void 0 ? void 0 : _a.lastMessage) === null || _b === void 0 ? void 0 : _b.clientId) === null
238
+ ? "null"
239
+ : (_d = (_c = this.deltaManager) === null || _c === void 0 ? void 0 : _c.lastMessage) === null || _d === void 0 ? void 0 : _d.clientId;
240
+ },
241
+ dmLastMsgClientSeq: () => { var _a, _b; return (_b = (_a = this.deltaManager) === null || _a === void 0 ? void 0 : _a.lastMessage) === null || _b === void 0 ? void 0 : _b.clientSequenceNumber; },
242
+ connectionStateDuration: () => common_utils_1.performance.now() - this.connectionTransitionTimes[this.connectionState],
239
243
  },
240
- dmLastMsgClientSeq: () => { var _a, _b; return (_b = (_a = this.deltaManager) === null || _a === void 0 ? void 0 : _a.lastMessage) === null || _b === void 0 ? void 0 : _b.clientSequenceNumber; },
241
- connectionStateDuration: () => common_utils_1.performance.now() - this.connectionTransitionTimes[this.connectionState],
242
244
  },
243
245
  });
244
246
  // Prefix all events in this file with container-loader
245
- this.mc = (0, telemetry_utils_1.loggerToMonitoringContext)(telemetry_utils_1.ChildLogger.create(this.subLogger, "Container"));
247
+ this.mc = (0, telemetry_utils_1.createChildMonitoringContext)({ logger: this.subLogger, namespace: "Container" });
246
248
  this._deltaManager = this.createDeltaManager();
247
249
  this.connectionStateHandler = (0, connectionStateHandler_1.createConnectionStateHandler)({
248
250
  logger: this.mc.logger,
@@ -303,8 +305,8 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
303
305
  document !== null &&
304
306
  typeof document.addEventListener === "function" &&
305
307
  document.addEventListener !== null;
306
- // keep track of last time page was visible for telemetry
307
- if (isDomAvailable) {
308
+ // keep track of last time page was visible for telemetry (on interactive clients only)
309
+ if (isDomAvailable && interactive) {
308
310
  this.lastVisible = document.hidden ? common_utils_1.performance.now() : undefined;
309
311
  this.visibilityEventHandler = () => {
310
312
  if (document.hidden) {
@@ -389,10 +391,10 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
389
391
  }
390
392
  }
391
393
  get closed() {
392
- return (this._lifecycleState === "closing" ||
393
- this._lifecycleState === "closed" ||
394
- this._lifecycleState === "disposing" ||
395
- this._lifecycleState === "disposed");
394
+ return (this._lifecycleState === "closing" || this._lifecycleState === "closed" || this.disposed);
395
+ }
396
+ get disposed() {
397
+ return this._lifecycleState === "disposing" || this._lifecycleState === "disposed";
396
398
  }
397
399
  get runtime() {
398
400
  if (this._runtime === undefined) {
@@ -979,8 +981,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
979
981
  // Initialize the protocol handler
980
982
  await this.initializeProtocolStateFromSnapshot(attributes, this.storageAdapter, snapshot);
981
983
  const codeDetails = this.getCodeDetailsFromQuorum();
982
- await this.instantiateContext(true, // existing
983
- codeDetails, snapshot, pendingLocalState === null || pendingLocalState === void 0 ? void 0 : pendingLocalState.pendingRuntimeState);
984
+ await this.instantiateRuntime(codeDetails, snapshot, pendingLocalState === null || pendingLocalState === void 0 ? void 0 : pendingLocalState.pendingRuntimeState);
984
985
  // replay saved ops
985
986
  if (pendingLocalState) {
986
987
  for (const message of pendingLocalState.savedOps) {
@@ -1039,7 +1040,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1039
1040
  dmLastKnownSeqNumber: this._deltaManager.lastKnownSeqNumber,
1040
1041
  };
1041
1042
  }
1042
- async createDetached(source) {
1043
+ async createDetached(codeDetails) {
1043
1044
  const attributes = {
1044
1045
  sequenceNumber: detachedContainerRefSeqNumber,
1045
1046
  term: protocol_1.OnlyValidTermValue,
@@ -1047,14 +1048,13 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1047
1048
  };
1048
1049
  await this.attachDeltaManagerOpHandler(attributes);
1049
1050
  // Need to just seed the source data in the code quorum. Quorum itself is empty
1050
- const qValues = (0, quorum_1.initQuorumValuesFromCodeDetails)(source);
1051
+ const qValues = (0, quorum_1.initQuorumValuesFromCodeDetails)(codeDetails);
1051
1052
  this.initializeProtocolState(attributes, {
1052
1053
  members: [],
1053
1054
  proposals: [],
1054
1055
  values: qValues,
1055
1056
  });
1056
- // The load context - given we seeded the quorum - will be great
1057
- await this.instantiateContextDetached(false);
1057
+ await this.instantiateRuntime(codeDetails, undefined);
1058
1058
  this.setLoaded();
1059
1059
  }
1060
1060
  async rehydrateDetachedFromSnapshot(detachedContainerSnapshot) {
@@ -1069,14 +1069,13 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1069
1069
  // Initialize the protocol handler
1070
1070
  const baseTree = (0, utils_1.getProtocolSnapshotTree)(snapshotTree);
1071
1071
  const qValues = await (0, driver_utils_1.readAndParse)(this.storageAdapter, baseTree.blobs.quorumValues);
1072
- const codeDetails = (0, quorum_1.getCodeDetailsFromQuorumValues)(qValues);
1073
1072
  this.initializeProtocolState(attributes, {
1074
1073
  members: [],
1075
1074
  proposals: [],
1076
- values: codeDetails !== undefined ? (0, quorum_1.initQuorumValuesFromCodeDetails)(codeDetails) : [],
1075
+ values: qValues,
1077
1076
  });
1078
- await this.instantiateContextDetached(true, // existing
1079
- snapshotTree);
1077
+ const codeDetails = this.getCodeDetailsFromQuorum();
1078
+ await this.instantiateRuntime(codeDetails, snapshotTree);
1080
1079
  this.setLoaded();
1081
1080
  }
1082
1081
  async getDocumentAttributes(storage, tree) {
@@ -1113,7 +1112,10 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1113
1112
  }
1114
1113
  initializeProtocolState(attributes, quorumSnapshot) {
1115
1114
  const protocol = this.protocolHandlerBuilder(attributes, quorumSnapshot, (key, value) => this.submitMessage(protocol_definitions_1.MessageType.Propose, JSON.stringify({ key, value })));
1116
- const protocolLogger = telemetry_utils_1.ChildLogger.create(this.subLogger, "ProtocolHandler");
1115
+ const protocolLogger = (0, telemetry_utils_1.createChildLogger)({
1116
+ logger: this.subLogger,
1117
+ namespace: "ProtocolHandler",
1118
+ });
1117
1119
  protocol.quorum.on("error", (error) => {
1118
1120
  protocolLogger.sendErrorEvent(error);
1119
1121
  });
@@ -1207,7 +1209,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1207
1209
  }
1208
1210
  createDeltaManager() {
1209
1211
  const serviceProvider = () => this.service;
1210
- const deltaManager = new deltaManager_1.DeltaManager(serviceProvider, telemetry_utils_1.ChildLogger.create(this.subLogger, "DeltaManager"), () => this.activeConnection(), (props) => new connectionManager_1.ConnectionManager(serviceProvider, () => this.isDirty, this.client, this._canReconnect, telemetry_utils_1.ChildLogger.create(this.subLogger, "ConnectionManager"), props));
1212
+ const deltaManager = new deltaManager_1.DeltaManager(serviceProvider, (0, telemetry_utils_1.createChildLogger)({ logger: this.subLogger, namespace: "DeltaManager" }), () => this.activeConnection(), (props) => new connectionManager_1.ConnectionManager(serviceProvider, () => this.isDirty, this.client, this._canReconnect, (0, telemetry_utils_1.createChildLogger)({ logger: this.subLogger, namespace: "ConnectionManager" }), props));
1211
1213
  // Disable inbound queues as Container is not ready to accept any ops until we are fully loaded!
1212
1214
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
1213
1215
  deltaManager.inbound.pause();
@@ -1277,7 +1279,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1277
1279
  if (value === connectionState_1.ConnectionState.Connected) {
1278
1280
  durationFromDisconnected =
1279
1281
  time - this.connectionTransitionTimes[connectionState_1.ConnectionState.Disconnected];
1280
- durationFromDisconnected = telemetry_utils_1.TelemetryLogger.formatTick(durationFromDisconnected);
1282
+ durationFromDisconnected = (0, telemetry_utils_1.formatTick)(durationFromDisconnected);
1281
1283
  }
1282
1284
  else if (value === connectionState_1.ConnectionState.CatchingUp) {
1283
1285
  // This info is of most interesting while Catching Up.
@@ -1296,7 +1298,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1296
1298
  connectionInitiationReason, pendingClientId: this.connectionStateHandler.pendingClientId, clientId: this.clientId, autoReconnect,
1297
1299
  opsBehind, online: driver_utils_1.OnlineStatus[(0, driver_utils_1.isOnline)()], lastVisible: this.lastVisible !== undefined
1298
1300
  ? common_utils_1.performance.now() - this.lastVisible
1299
- : undefined, checkpointSequenceNumber, quorumSize: (_a = this._protocolHandler) === null || _a === void 0 ? void 0 : _a.quorum.getMembers().size }, this._deltaManager.connectionProps), error);
1301
+ : undefined, checkpointSequenceNumber, quorumSize: (_a = this._protocolHandler) === null || _a === void 0 ? void 0 : _a.quorum.getMembers().size, isDirty: this.isDirty }, this._deltaManager.connectionProps), error);
1300
1302
  if (value === connectionState_1.ConnectionState.Connected) {
1301
1303
  this.firstConnection = false;
1302
1304
  }
@@ -1312,22 +1314,10 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1312
1314
  return;
1313
1315
  }
1314
1316
  const state = this.connectionState === connectionState_1.ConnectionState.Connected;
1315
- const logOpsOnReconnect = this.connectionState === connectionState_1.ConnectionState.Connected &&
1316
- !this.firstConnection &&
1317
- this.connectionMode === "write";
1318
- if (logOpsOnReconnect) {
1319
- this.messageCountAfterDisconnection = 0;
1320
- }
1321
1317
  // Both protocol and context should not be undefined if we got so far.
1322
1318
  this.setContextConnectedState(state, (_a = this.readOnlyInfo.readonly) !== null && _a !== void 0 ? _a : false);
1323
1319
  this.protocolHandler.setConnectionState(state, this.clientId);
1324
1320
  (0, telemetry_utils_1.raiseConnectedEvent)(this.mc.logger, this, state, this.clientId, disconnectedReason);
1325
- if (logOpsOnReconnect) {
1326
- this.mc.logger.sendTelemetryEvent({
1327
- eventName: "OpsSentOnReconnect",
1328
- count: this.messageCountAfterDisconnection,
1329
- });
1330
- }
1331
1321
  }
1332
1322
  // back-compat: ADO #1385: Remove in the future, summary op should come through submitSummaryMessage()
1333
1323
  submitContainerMessage(type, contents, batch, metadata) {
@@ -1370,7 +1360,6 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1370
1360
  this.mc.logger.sendErrorEvent({ eventName: "SubmitMessageWithNoConnection", type });
1371
1361
  return -1;
1372
1362
  }
1373
- this.messageCountAfterDisconnection += 1;
1374
1363
  (_a = this.noopHeuristic) === null || _a === void 0 ? void 0 : _a.notifyMessageSent();
1375
1364
  return this._deltaManager.submit(type, contents, batch, metadata, compression, referenceSequenceNumber);
1376
1365
  }
@@ -1462,14 +1451,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1462
1451
  }
1463
1452
  return { snapshot, versionId: version === null || version === void 0 ? void 0 : version.id };
1464
1453
  }
1465
- async instantiateContextDetached(existing, snapshot) {
1466
- const codeDetails = this.getCodeDetailsFromQuorum();
1467
- if (codeDetails === undefined) {
1468
- throw new Error("pkg should be provided in create flow!!");
1469
- }
1470
- await this.instantiateContext(existing, codeDetails, snapshot);
1471
- }
1472
- async instantiateContext(existing, codeDetails, snapshot, pendingLocalState) {
1454
+ async instantiateRuntime(codeDetails, snapshot, pendingLocalState) {
1473
1455
  var _a, _b;
1474
1456
  (0, common_utils_1.assert)(((_a = this._runtime) === null || _a === void 0 ? void 0 : _a.disposed) !== false, 0x0dd /* "Existing runtime not disposed" */);
1475
1457
  // The relative loader will proxy requests to '/' to the loader itself assuming no non-cache flags
@@ -1493,6 +1475,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1493
1475
  var _a;
1494
1476
  return ((_a = this.protocolHandler.quorum.get("code")) !== null && _a !== void 0 ? _a : this.protocolHandler.quorum.get("code2"));
1495
1477
  };
1478
+ const existing = snapshot !== undefined;
1496
1479
  const context = new containerContext_1.ContainerContext(this.options, this.scope, snapshot, this._loadedFromVersion, this._deltaManager, this.storageAdapter, this.protocolHandler.quorum, this.protocolHandler.audience, loader, (type, contents, batch, metadata) => this.submitContainerMessage(type, contents, batch, metadata), (summaryOp, referenceSequenceNumber) => this.submitSummaryMessage(summaryOp, referenceSequenceNumber), (batch, referenceSequenceNumber) => this.submitBatch(batch, referenceSequenceNumber), (message) => this.submitSignal(message), (error) => this.dispose(error), (error) => this.close(error), this.updateDirtyContainerState, this.getAbsoluteUrl, () => { var _a; return (_a = this.resolvedUrl) === null || _a === void 0 ? void 0 : _a.id; }, () => this.clientId, () => this._deltaManager.serviceConfiguration, () => this.attachState, () => this.connected, getSpecifiedCodeDetails, this._deltaManager.clientDetails, existing, this.subLogger, pendingLocalState);
1497
1480
  this._lifecycleEvents.once("disposed", () => {
1498
1481
  context.dispose();
@@ -1500,7 +1483,6 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
1500
1483
  this._runtime = await telemetry_utils_1.PerformanceEvent.timedExecAsync(this.subLogger, { eventName: "InstantiateRuntime" }, async () => runtimeFactory.instantiateRuntime(context, existing));
1501
1484
  this._lifecycleEvents.emit("runtimeInstantiated");
1502
1485
  this._loadedCodeDetails = codeDetails;
1503
- this.emit("contextChanged", codeDetails);
1504
1486
  }
1505
1487
  /**
1506
1488
  * Set the connected state of the ContainerContext