From ecbf0d8636a728be481a4d1f25df64bdf38a2c5a Mon Sep 17 00:00:00 2001 From: Arin Taylor Date: Thu, 27 May 2021 11:07:24 -0700 Subject: [PATCH] Enable writing isolated channels by default (#6231) * Enable isolated channels * Point to PR for snapshot tests * Point to correct PR commit * Update to latest * Revert to PR commit * Move to latest PR commit * Fix gc summary tests * Fix more tests --- packages/runtime/container-runtime/src/containerRuntime.ts | 4 ++-- packages/test/snapshots/content | 2 +- .../src/test/gcReferenceUpdatesInLocalSummary.spec.ts | 3 ++- .../test-end-to-end-tests/src/test/gcSummaryTests.spec.ts | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/runtime/container-runtime/src/containerRuntime.ts b/packages/runtime/container-runtime/src/containerRuntime.ts index 095bf14331f1..1cc0a7786444 100644 --- a/packages/runtime/container-runtime/src/containerRuntime.ts +++ b/packages/runtime/container-runtime/src/containerRuntime.ts @@ -811,8 +811,8 @@ export class ContainerRuntime extends TypedEventEmitter && !this.runtimeOptions.gcOptions.disableGC ); - // Default to true (disabled) until a few versions have passed. - this.disableIsolatedChannels = this.runtimeOptions.summaryOptions.disableIsolatedChannels ?? true; + // Default to false (enabled). + this.disableIsolatedChannels = this.runtimeOptions.summaryOptions.disableIsolatedChannels ?? false; this._connected = this.context.connected; this.chunkMap = new Map(chunks); diff --git a/packages/test/snapshots/content b/packages/test/snapshots/content index bc33b77af947..2417b0c9833e 160000 --- a/packages/test/snapshots/content +++ b/packages/test/snapshots/content @@ -1 +1 @@ -Subproject commit bc33b77af9474400cb67a05cd61d2faf070bb75c +Subproject commit 2417b0c9833e83d644a68d2da19c4cb8bf2efad5 diff --git a/packages/test/test-end-to-end-tests/src/test/gcReferenceUpdatesInLocalSummary.spec.ts b/packages/test/test-end-to-end-tests/src/test/gcReferenceUpdatesInLocalSummary.spec.ts index 506014d828eb..2e7a31ee74d3 100644 --- a/packages/test/test-end-to-end-tests/src/test/gcReferenceUpdatesInLocalSummary.spec.ts +++ b/packages/test/test-end-to-end-tests/src/test/gcReferenceUpdatesInLocalSummary.spec.ts @@ -106,7 +106,8 @@ describeNoCompat("GC reference updates in local summary", (getTestObjectProvider }); let dataStoreTree: ISummaryTree | undefined; - for (const [ id, summaryObject ] of Object.entries(summary.tree)) { + const channelsTree = (summary.tree[".channels"] as ISummaryTree)?.tree ?? summary.tree; + for (const [ id, summaryObject ] of Object.entries(channelsTree)) { if (id === dataStoreId) { assert( summaryObject.type === SummaryType.Tree, diff --git a/packages/test/test-end-to-end-tests/src/test/gcSummaryTests.spec.ts b/packages/test/test-end-to-end-tests/src/test/gcSummaryTests.spec.ts index 36008981f162..10bb6cc63803 100644 --- a/packages/test/test-end-to-end-tests/src/test/gcSummaryTests.spec.ts +++ b/packages/test/test-end-to-end-tests/src/test/gcSummaryTests.spec.ts @@ -84,7 +84,9 @@ describeNoCompat("Garbage Collection", (getTestObjectProvider) => { */ function validateDataStoreInSummary(summary: ISummaryTree, dataStoreId: string, referenced: boolean) { let dataStoreTree: ISummaryTree | undefined; - for (const [ id, summaryObject ] of Object.entries(summary.tree)) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion + const channelsTree = (summary.tree[".channels"] as ISummaryTree)?.tree ?? summary.tree; + for (const [ id, summaryObject ] of Object.entries(channelsTree)) { if (id === dataStoreId) { assert( summaryObject.type === SummaryType.Tree,