diff --git a/packages/runtime/container-runtime/src/containerRuntime.ts b/packages/runtime/container-runtime/src/containerRuntime.ts index 7565890bf485..b71916f96ce9 100644 --- a/packages/runtime/container-runtime/src/containerRuntime.ts +++ b/packages/runtime/container-runtime/src/containerRuntime.ts @@ -1571,7 +1571,6 @@ export class ContainerRuntime enableGroupedBatching: true, ...runtimeOptions, }; - this.logger = createChildLogger({ logger: this.baseLogger }); this.mc = createChildMonitoringContext({ logger: this.logger, diff --git a/packages/runtime/container-runtime/src/test/containerRuntime.spec.ts b/packages/runtime/container-runtime/src/test/containerRuntime.spec.ts index 35d384955fa2..f195841000d6 100644 --- a/packages/runtime/container-runtime/src/test/containerRuntime.spec.ts +++ b/packages/runtime/container-runtime/src/test/containerRuntime.spec.ts @@ -1124,14 +1124,15 @@ describe("Runtime", () => { describe("Unrecognized types not supported", () => { let containerRuntime: ContainerRuntime; beforeEach(async () => { + const runtimeOptions: IContainerRuntimeOptionsInternal = { + enableGroupedBatching: false, + }; containerRuntime = await ContainerRuntime.loadRuntime({ context: getMockContext() as IContainerContext, registryEntries: [], existing: false, requestHandler: undefined, - runtimeOptions: { - enableGroupedBatching: false, - }, + runtimeOptions, provideEntryPoint: mockProvideEntryPoint, }); }); @@ -2588,14 +2589,15 @@ describe("Runtime", () => { runtimes = new Map(); logger = new MockLogger(); droppedSignals = []; + const runtimeOptions: IContainerRuntimeOptionsInternal = { + enableGroupedBatching: false, + }; containerRuntime = await ContainerRuntime.loadRuntime({ context: getMockContext({ logger }) as IContainerContext, registryEntries: [], existing: false, requestHandler: undefined, - runtimeOptions: { - enableGroupedBatching: false, - }, + runtimeOptions, provideEntryPoint: mockProvideEntryPoint, }); // Assert that clientId is not undefined @@ -3160,6 +3162,9 @@ describe("Runtime", () => { beforeEach(async () => { remoteLogger = new MockLogger(); + const runtimeOptions: IContainerRuntimeOptionsInternal = { + enableGroupedBatching: false, + }; remoteContainerRuntime = await ContainerRuntime.loadRuntime({ context: getMockContext( { logger: remoteLogger }, @@ -3168,9 +3173,7 @@ describe("Runtime", () => { registryEntries: [], existing: false, requestHandler: undefined, - runtimeOptions: { - enableGroupedBatching: false, - }, + runtimeOptions, provideEntryPoint: mockProvideEntryPoint, }); // Assert that clientId is not undefined diff --git a/packages/test/test-end-to-end-tests/src/test/batchBreakRegression.spec.ts b/packages/test/test-end-to-end-tests/src/test/batchBreakRegression.spec.ts index 8d621b4b962b..2a894cd6ae0f 100644 --- a/packages/test/test-end-to-end-tests/src/test/batchBreakRegression.spec.ts +++ b/packages/test/test-end-to-end-tests/src/test/batchBreakRegression.spec.ts @@ -11,7 +11,7 @@ import { TypedEventEmitter } from "@fluid-internal/client-utils"; import { describeCompat, itExpects } from "@fluid-private/test-version-utils"; import { CompressionAlgorithms, - IContainerRuntimeOptions, + type IContainerRuntimeOptionsInternal, } from "@fluidframework/container-runtime/internal"; import { FluidErrorTypes } from "@fluidframework/core-interfaces/internal"; import { @@ -47,7 +47,7 @@ async function runAndValidateBatch( provider: ITestObjectProvider, proxyDsf: IDocumentServiceFactory, timeout: number, - runtimeOptions?: IContainerRuntimeOptions, + runtimeOptions?: IContainerRuntimeOptionsInternal, ) { let containerUrl: string | undefined; { diff --git a/packages/test/test-end-to-end-tests/src/test/blobs.spec.ts b/packages/test/test-end-to-end-tests/src/test/blobs.spec.ts index e7638e763892..e84d17938cc4 100644 --- a/packages/test/test-end-to-end-tests/src/test/blobs.spec.ts +++ b/packages/test/test-end-to-end-tests/src/test/blobs.spec.ts @@ -18,6 +18,7 @@ import { CompressionAlgorithms, ContainerMessageType, DefaultSummaryConfiguration, + type IContainerRuntimeOptionsInternal, } from "@fluidframework/container-runtime/internal"; import { IErrorBase, IFluidHandle } from "@fluidframework/core-interfaces"; import { Deferred } from "@fluidframework/core-utils/internal"; @@ -244,16 +245,18 @@ describeCompat("blobs", "FullCompat", (getTestObjectProvider, apis) => { this.skip(); } + const runtimeOptions: IContainerRuntimeOptionsInternal = { + ...testContainerConfig.runtimeOptions, + compressionOptions: { + minimumBatchSizeInBytes: 1, + compressionAlgorithm: CompressionAlgorithms.lz4, + }, + enableGroupedBatching, + }; + const container = await provider.makeTestContainer({ ...testContainerConfig, - runtimeOptions: { - ...testContainerConfig.runtimeOptions, - compressionOptions: { - minimumBatchSizeInBytes: 1, - compressionAlgorithm: CompressionAlgorithms.lz4, - }, - enableGroupedBatching, - }, + runtimeOptions, }); const dataStore = await getContainerEntryPointBackCompat(container); diff --git a/packages/test/test-end-to-end-tests/src/test/compression.spec.ts b/packages/test/test-end-to-end-tests/src/test/compression.spec.ts index 3128c55c5ae0..d385ec3fb791 100644 --- a/packages/test/test-end-to-end-tests/src/test/compression.spec.ts +++ b/packages/test/test-end-to-end-tests/src/test/compression.spec.ts @@ -16,6 +16,7 @@ import { import { CompressionAlgorithms, type IContainerRuntimeOptions, + type IContainerRuntimeOptionsInternal, } from "@fluidframework/container-runtime/internal"; // TODO:AB#6558: This should be provided based on the compatibility configuration. // eslint-disable-next-line @typescript-eslint/no-restricted-imports @@ -48,7 +49,7 @@ const compressionSuite = (getProvider) => { }); async function setupContainers( - runtimeOptions: IContainerRuntimeOptions = defaultRuntimeOptions, + runtimeOptions: IContainerRuntimeOptionsInternal = defaultRuntimeOptions, ) { const containerConfig: ITestContainerConfig = { registry: [["mapKey", SharedMap.getFactory()]], diff --git a/packages/test/test-end-to-end-tests/src/test/dataStoresNested.spec.ts b/packages/test/test-end-to-end-tests/src/test/dataStoresNested.spec.ts index 4e80e0a0b845..b4fcb8e66937 100644 --- a/packages/test/test-end-to-end-tests/src/test/dataStoresNested.spec.ts +++ b/packages/test/test-end-to-end-tests/src/test/dataStoresNested.spec.ts @@ -10,9 +10,9 @@ import { Loader } from "@fluidframework/container-loader/internal"; import { ChannelCollection, ChannelCollectionFactory, - IContainerRuntimeOptions, ISummarizer, SummaryCollection, + type IContainerRuntimeOptionsInternal, } from "@fluidframework/container-runtime/internal"; import { assert } from "@fluidframework/core-utils/internal"; import { IFluidDataStoreChannel } from "@fluidframework/runtime-definitions/internal"; @@ -45,7 +45,7 @@ describeCompat("Nested DataStores", "NoCompat", (getTestObjectProvider, apis) => let summarizer: ISummarizer | undefined; let loader: IHostLoader | undefined; - const runtimeOptions: IContainerRuntimeOptions = { + const runtimeOptions: IContainerRuntimeOptionsInternal = { enableGroupedBatching: true, // Force summarizer heuristics to be disabled so we can control when to summarize summaryOptions: { diff --git a/packages/test/test-utils/src/testContainerRuntimeFactory.ts b/packages/test/test-utils/src/testContainerRuntimeFactory.ts index 7f52357828cd..138ef3e2c7a7 100644 --- a/packages/test/test-utils/src/testContainerRuntimeFactory.ts +++ b/packages/test/test-utils/src/testContainerRuntimeFactory.ts @@ -7,7 +7,7 @@ import { IContainerContext, IRuntime } from "@fluidframework/container-definitio import { ContainerRuntime, DefaultSummaryConfiguration, - IContainerRuntimeOptions, + type IContainerRuntimeOptionsInternal, } from "@fluidframework/container-runtime/internal"; import { IContainerRuntime, @@ -54,7 +54,7 @@ interface backCompat_ContainerRuntime { context: IContainerContext, registryEntries: NamedFluidDataStoreRegistryEntries, requestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise, - runtimeOptions?: IContainerRuntimeOptions, + runtimeOptions?: IContainerRuntimeOptionsInternal, containerScope?: FluidObject, existing?: boolean, containerRuntimeCtor?: typeof ContainerRuntime, @@ -72,7 +72,7 @@ export const createTestContainerRuntimeFactory = ( constructor( public type: string, public dataStoreFactory: IFluidDataStoreFactory, - public runtimeOptions: IContainerRuntimeOptions = { + public runtimeOptions: IContainerRuntimeOptionsInternal = { summaryOptions: { summaryConfigOverrides: { ...DefaultSummaryConfiguration, diff --git a/packages/test/test-version-utils/src/compatUtils.ts b/packages/test/test-version-utils/src/compatUtils.ts index fc28304df87e..4fcb872b2841 100644 --- a/packages/test/test-version-utils/src/compatUtils.ts +++ b/packages/test/test-version-utils/src/compatUtils.ts @@ -7,10 +7,10 @@ import { mixinAttributor } from "@fluid-experimental/attributor"; import { TestDriverTypes } from "@fluid-internal/test-driver-definitions"; import { FluidTestDriverConfig, createFluidTestDriver } from "@fluid-private/test-drivers"; import { - IContainerRuntimeOptions, DefaultSummaryConfiguration, CompressionAlgorithms, ICompressionRuntimeOptions, + type IContainerRuntimeOptionsInternal, } from "@fluidframework/container-runtime/internal"; import { FluidObject, IFluidLoadable, IRequest } from "@fluidframework/core-interfaces"; import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal"; @@ -63,7 +63,7 @@ export const TestDataObjectType = "@fluid-example/test-dataStore"; */ function filterRuntimeOptionsForVersion( version: string, - optionsArg: IContainerRuntimeOptions = { + optionsArg: IContainerRuntimeOptionsInternal = { summaryOptions: { summaryConfigOverrides: { ...DefaultSummaryConfiguration,