Skip to content

Commit

Permalink
Ensure compression is disabled everywhere grouping is
Browse files Browse the repository at this point in the history
Some places tried to use undefined to disable.
This does not work, it gets replaced with default values.
  • Loading branch information
markfields committed Jan 18, 2025
1 parent 70c9da0 commit eb0ea1b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import { ChannelCollection } from "../channelCollection.js";
import {
CompressionAlgorithms,
ContainerRuntime,
disabledCompressionConfig,
IContainerRuntimeOptions,
IPendingRuntimeState,
defaultPendingOpsWaitTimeoutMs,
Expand Down Expand Up @@ -1126,6 +1127,7 @@ describe("Runtime", () => {
beforeEach(async () => {
const runtimeOptions: IContainerRuntimeOptionsInternal = {
enableGroupedBatching: false,
compressionOptions: disabledCompressionConfig,
};
containerRuntime = await ContainerRuntime.loadRuntime({
context: getMockContext() as IContainerContext,
Expand Down Expand Up @@ -1408,10 +1410,7 @@ describe("Runtime", () => {
gcOptions: {},
loadSequenceNumberVerification: "close",
flushMode: FlushMode.TurnBased,
compressionOptions: {
minimumBatchSizeInBytes: 614400,
compressionAlgorithm: CompressionAlgorithms.lz4,
},
compressionOptions: disabledCompressionConfig,
maxBatchSizeInBytes: 700 * 1024,
chunkSizeInBytes: 204800,
enableRuntimeIdCompressor: undefined,
Expand Down Expand Up @@ -2591,6 +2590,7 @@ describe("Runtime", () => {
droppedSignals = [];
const runtimeOptions: IContainerRuntimeOptionsInternal = {
enableGroupedBatching: false,
compressionOptions: disabledCompressionConfig,
};
containerRuntime = await ContainerRuntime.loadRuntime({
context: getMockContext({ logger }) as IContainerContext,
Expand Down Expand Up @@ -3164,6 +3164,7 @@ describe("Runtime", () => {
remoteLogger = new MockLogger();
const runtimeOptions: IContainerRuntimeOptionsInternal = {
enableGroupedBatching: false,
compressionOptions: disabledCompressionConfig,
};
remoteContainerRuntime = await ContainerRuntime.loadRuntime({
context: getMockContext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { strict as assert } from "assert";
import { describeCompat } from "@fluid-private/test-version-utils";
import { IAgentScheduler, TaskSubscription } from "@fluidframework/agent-scheduler/internal";
import { IContainer } from "@fluidframework/container-definitions/internal";
import { disabledCompressionConfig } from "@fluidframework/container-runtime/internal";
import {
ITestObjectProvider,
createTestContainerRuntimeFactory,
Expand Down Expand Up @@ -42,7 +43,7 @@ describeCompat("AgentScheduler", "FullCompat", (getTestObjectProvider, apis) =>
// getVersionedTestObjectProviderFromApis() / getCompatVersionedTestObjectProviderFromApis(),
// but it's too cumbersome, so just disable all options that can screw up compat matrix
{
compressionOptions: undefined,
compressionOptions: disabledCompressionConfig,
enableGroupedBatching: false,
enableRuntimeIdCompressor: undefined,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { TypedEventEmitter } from "@fluid-internal/client-utils";
import { describeCompat, itExpects } from "@fluid-private/test-version-utils";
import {
CompressionAlgorithms,
disabledCompressionConfig,
type IContainerRuntimeOptionsInternal,
} from "@fluidframework/container-runtime/internal";
import { FluidErrorTypes } from "@fluidframework/core-interfaces/internal";
Expand Down Expand Up @@ -416,6 +417,7 @@ describeCompat("Batching failures", "NoCompat", (getTestObjectProvider) => {
try {
await runAndValidateBatch(provider, proxyDsf, this.timeout(), {
enableGroupedBatching: false,
compressionOptions: disabledCompressionConfig,
});
assert.fail("expected error");
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ import {
} from "@fluidframework/container-definitions/internal";
import { ConnectionState } from "@fluidframework/container-loader";
import { Loader } from "@fluidframework/container-loader/internal";
import {
CompressionAlgorithms,
ContainerMessageType,
} from "@fluidframework/container-runtime/internal";
import { ContainerMessageType } from "@fluidframework/container-runtime/internal";
import { FluidObject, IFluidHandle, IRequest } from "@fluidframework/core-interfaces";
import { Deferred } from "@fluidframework/core-utils/internal";
import {
Expand Down Expand Up @@ -96,12 +93,6 @@ describeCompat("Detached Container", "FullCompat", (getTestObjectProvider, apis)
const testContainerConfig: ITestContainerConfig = {
fluidDataObjectType: DataObjectFactoryType.Test,
registry,
runtimeOptions: {
compressionOptions: {
minimumBatchSizeInBytes: Infinity,
compressionAlgorithm: CompressionAlgorithms.lz4,
},
},
};

let provider: ITestObjectProvider;
Expand Down
3 changes: 2 additions & 1 deletion packages/test/test-version-utils/src/compatUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { FluidTestDriverConfig, createFluidTestDriver } from "@fluid-private/tes
import {
DefaultSummaryConfiguration,
CompressionAlgorithms,
disabledCompressionConfig,
ICompressionRuntimeOptions,
type IContainerRuntimeOptionsInternal,
} from "@fluidframework/container-runtime/internal";
Expand Down Expand Up @@ -102,7 +103,7 @@ function filterRuntimeOptionsForVersion(
if (version.startsWith("1.")) {
options = {
// None of these features are supported by 1.3
compressionOptions: undefined,
compressionOptions: disabledCompressionConfig,
enableGroupedBatching: false,
enableRuntimeIdCompressor: undefined,
// Enable chunking.
Expand Down

0 comments on commit eb0ea1b

Please sign in to comment.