Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .changeset/heavy-bugs-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
"@fluidframework/container-definitions": minor
"@fluidframework/runtime-definitions": minor
"__section": breaking
---
Deprecated properties have been removed from IRuntimeStorageService and IContainerStorageService

The following deprecated properties have been removed from `IRuntimeStorageService`:

- `createBlob`
- `dispose`
- `disposed`
- `downloadSummary`
- `getSnapshot`
- `getSnapshotTree`
- `getVersions`
- `policies`
- `uploadSummaryWithContext`

The following deprecated properties have been removed from `IContainerStorageService`:

- `dispose`
- `disposed`
- `downloadSummary`

The deprecations were announced in version [2.52.0](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.52.0).
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,6 @@ export type IContainerPolicies = {
// @beta @legacy
export interface IContainerStorageService {
createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;
// @deprecated
dispose?(error?: Error): void;
// @deprecated
readonly disposed?: boolean;
// @deprecated
downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
getSnapshot?(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;
getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;
getVersions(versionId: string | null, count: number, scenarioName?: string, fetchSource?: FetchSource): Promise<IVersion[]>;
Expand Down
9 changes: 8 additions & 1 deletion packages/common/container-definitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,14 @@
"typescript": "~5.4.5"
},
"typeValidation": {
"broken": {},
"broken": {
"Interface_IContainerContext": {
"backCompat": false
},
"Interface_IContainerStorageService": {
"backCompat": false
}
},
"entrypoint": "legacy"
}
}
29 changes: 0 additions & 29 deletions packages/common/container-definitions/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import type {
ISnapshotFetchOptions,
FetchSource,
IDocumentStorageServicePolicies,
ISummaryHandle,
} from "@fluidframework/driver-definitions/internal";

import type { IAudience } from "./audience.js";
Expand Down Expand Up @@ -143,25 +142,6 @@ export interface IBatchMessage {
* @legacy @beta
*/
export interface IContainerStorageService {
/**
* Whether or not the object has been disposed.
* If true, the object should be considered invalid, and its other state should be disregarded.
*
* @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
* it is unused in the Runtime layer.
*/
readonly disposed?: boolean;

/**
* Dispose of the object and its resources.
* @param error - Optional error indicating the reason for the disposal, if the object was
* disposed as the result of an error.
*
* @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
* it is unused in the Runtime layer.
*/
dispose?(error?: Error): void;

/**
* Policies implemented/instructed by driver.
*
Expand Down Expand Up @@ -230,15 +210,6 @@ export interface IContainerStorageService {
* Returns the uploaded summary handle.
*/
uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;

/**
* Retrieves the commit that matches the packfile handle. If the packfile has already been committed and the
* server has deleted it this call may result in a broken promise.
*
* @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
* it is unused in the Runtime and below layers.
*/
downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ declare type old_as_current_for_Interface_IContainerContext = requireAssignableT
* typeValidation.broken:
* "Interface_IContainerContext": {"backCompat": false}
*/
// @ts-expect-error compatibility expected to be broken
declare type current_as_old_for_Interface_IContainerContext = requireAssignableTo<TypeOnly<current.IContainerContext>, TypeOnly<old.IContainerContext>>

/*
Expand Down Expand Up @@ -265,6 +266,7 @@ declare type old_as_current_for_Interface_IContainerStorageService = requireAssi
* typeValidation.broken:
* "Interface_IContainerStorageService": {"backCompat": false}
*/
// @ts-expect-error compatibility expected to be broken
declare type current_as_old_for_Interface_IContainerStorageService = requireAssignableTo<TypeOnly<current.IContainerStorageService>, TypeOnly<old.IContainerStorageService>>

/*
Expand Down
6 changes: 5 additions & 1 deletion packages/framework/aqueduct/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@
"typescript": "~5.4.5"
},
"typeValidation": {
"broken": {},
"broken": {
"Interface_IDataObjectProps": {
"backCompat": false
}
},
"entrypoint": "legacy"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -319,4 +319,5 @@ declare type old_as_current_for_Interface_IDataObjectProps = requireAssignableTo
* typeValidation.broken:
* "Interface_IDataObjectProps": {"backCompat": false}
*/
// @ts-expect-error compatibility expected to be broken
declare type current_as_old_for_Interface_IDataObjectProps = requireAssignableTo<TypeOnly<current.IDataObjectProps>, TypeOnly<old.IDataObjectProps>>
4 changes: 2 additions & 2 deletions packages/loader/container-loader/src/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type {
ReadOnlyInfo,
ILoader,
ILoaderOptions,
IContainerStorageService,
} from "@fluidframework/container-definitions/internal";
import { isFluidCodeDetails } from "@fluidframework/container-definitions/internal";
import {
Expand All @@ -54,7 +55,6 @@ import {
import {
type IDocumentService,
type IDocumentServiceFactory,
type IDocumentStorageService,
type IResolvedUrl,
type ISnapshot,
type IThrottlingWarning,
Expand Down Expand Up @@ -1887,7 +1887,7 @@ export class Container

private async initializeProtocolStateFromSnapshot(
attributes: IDocumentAttributes,
storage: IDocumentStorageService,
storage: IContainerStorageService,
snapshot: ISnapshotTree | undefined,
): Promise<void> {
const quorumSnapshot: IQuorumSnapshot = {
Expand Down
12 changes: 1 addition & 11 deletions packages/loader/container-loader/src/containerStorageAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
} from "@fluidframework/container-definitions/internal";
import type { IDisposable } from "@fluidframework/core-interfaces";
import { assert } from "@fluidframework/core-utils/internal";
import type { ISummaryHandle, ISummaryTree } from "@fluidframework/driver-definitions";
import type { ISummaryTree } from "@fluidframework/driver-definitions";
import type {
FetchSource,
IDocumentService,
Expand Down Expand Up @@ -247,16 +247,6 @@ export class ContainerStorageAdapter
public async createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse> {
return this._storageService.createBlob(file);
}

/**
* {@link IRuntimeStorageService.downloadSummary}.
*
* @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
* it is unused in the Runtime and below layers.
*/
public async downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree> {
return this._storageService.downloadSummary(handle);
}
}

/**
Expand Down
9 changes: 8 additions & 1 deletion packages/runtime/container-runtime-definitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,14 @@
"typescript": "~5.4.5"
},
"typeValidation": {
"broken": {},
"broken": {
"Interface_IContainerRuntime": {
"backCompat": false
},
"Interface_IContainerRuntimeWithResolveHandle_Deprecated": {
"backCompat": false
}
},
"entrypoint": "legacy"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ declare type MakeUnusedImportErrorsGoAway<T> = TypeOnly<T> | MinimalType<T> | Fu
* typeValidation.broken:
* "Interface_IContainerRuntime": {"backCompat": false}
*/
// @ts-expect-error compatibility expected to be broken
declare type current_as_old_for_Interface_IContainerRuntime = requireAssignableTo<TypeOnly<current.IContainerRuntime>, TypeOnly<old.IContainerRuntime>>

/*
Expand Down Expand Up @@ -49,6 +50,7 @@ declare type old_as_current_for_Interface_IContainerRuntimeWithResolveHandle_Dep
* typeValidation.broken:
* "Interface_IContainerRuntimeWithResolveHandle_Deprecated": {"backCompat": false}
*/
// @ts-expect-error compatibility expected to be broken
declare type current_as_old_for_Interface_IContainerRuntimeWithResolveHandle_Deprecated = requireAssignableTo<TypeOnly<current.IContainerRuntimeWithResolveHandle_Deprecated>, TypeOnly<old.IContainerRuntimeWithResolveHandle_Deprecated>>

/*
Expand Down
6 changes: 5 additions & 1 deletion packages/runtime/container-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,11 @@
"typescript": "~5.4.5"
},
"typeValidation": {
"broken": {},
"broken": {
"Interface_LoadContainerRuntimeParams": {
"backCompat": false
}
},
"entrypoint": "legacy"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,7 @@
* Licensed under the MIT License.
*/

import type {
FetchSource,
ICreateBlobResponse,
IDocumentStorageServicePolicies,
ISnapshot,
ISnapshotFetchOptions,
ISnapshotTree,
ISummaryContext,
ISummaryHandle,
ISummaryTree,
IVersion,
} from "@fluidframework/driver-definitions/internal";
import type { IRuntimeStorageService } from "@fluidframework/runtime-definitions/internal";
import { UsageError } from "@fluidframework/telemetry-utils/internal";

/**
* IRuntimeStorageService proxy which intercepts requests if they can be satisfied by the blobs received in the
Expand All @@ -28,14 +15,6 @@ export class StorageServiceWithAttachBlobs implements IRuntimeStorageService {
private readonly attachBlobs: Map<string, ArrayBufferLike>,
) {}

/**
* {@link IRuntimeStorageService.policies}.
* @deprecated - This will be removed in a future release. The DataStore layer does not need this.
*/
public get policies(): IDocumentStorageServicePolicies | undefined {
return this.internalStorageService.policies;
}

public async readBlob(id: string): Promise<ArrayBufferLike> {
const blob = this.attachBlobs.get(id);
if (blob !== undefined) {
Expand All @@ -46,75 +25,4 @@ export class StorageServiceWithAttachBlobs implements IRuntimeStorageService {
// IRuntimeStorageService to cache appropriately, no need to double-cache.
return this.internalStorageService.readBlob(id);
}

/**
* {@link IRuntimeStorageService.getSnapshotTree}.
* @deprecated - This will be removed in a future release. The DataStore layer does not need this.
*/
public async getSnapshotTree(
version?: IVersion,
scenarioName?: string,
// eslint-disable-next-line @rushstack/no-new-null
): Promise<ISnapshotTree | null> {
return this.internalStorageService.getSnapshotTree(version, scenarioName);
}

/**
* {@link IRuntimeStorageService.getSnapshot}.
* @deprecated - This will be removed in a future release. The DataStore layer does not need this.
*/
public async getSnapshot(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot> {
if (this.internalStorageService.getSnapshot !== undefined) {
return this.internalStorageService.getSnapshot(snapshotFetchOptions);
}
throw new UsageError(
"getSnapshot api should exist on internal storage in documentStorageServiceProxy class",
);
}

/**
* {@link IRuntimeStorageService.getVersions}.
* @deprecated - This will be removed in a future release. The DataStore layer does not need this.
*/
public async getVersions(
// eslint-disable-next-line @rushstack/no-new-null
versionId: string | null,
count: number,
scenarioName?: string,
fetchSource?: FetchSource,
): Promise<IVersion[]> {
return this.internalStorageService.getVersions(
versionId,
count,
scenarioName,
fetchSource,
);
}

/**
* {@link IRuntimeStorageService.uploadSummaryWithContext}.
* @deprecated - This will be removed in a future release. The DataStore layer does not need this.
*/
public async uploadSummaryWithContext(
summary: ISummaryTree,
context: ISummaryContext,
): Promise<string> {
return this.internalStorageService.uploadSummaryWithContext(summary, context);
}

/**
* {@link IRuntimeStorageService.createBlob}.
* @deprecated - This will be removed in a future release. The DataStore layer does not need this.
*/
public async createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse> {
return this.internalStorageService.createBlob(file);
}

/**
* {@link IRuntimeStorageService.downloadSummary}.
* @deprecated - This will be removed in a future release. The DataStore layer does not need this.
*/
public async downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree> {
return this.internalStorageService.downloadSummary(handle);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
ContainerErrorTypes,
type IContainerContext,
type IBatchMessage,
type IContainerStorageService,
} from "@fluidframework/container-definitions/internal";
import type { IContainerRuntime } from "@fluidframework/container-runtime-definitions/internal";
import type {
Expand Down Expand Up @@ -242,7 +243,7 @@ describe("Runtime", () => {
const mockClientId = "mockClientId";

// Mock the storage layer so "submitSummary" works.
const defaultMockStorage: Partial<IRuntimeStorageService> = {
const defaultMockStorage: Partial<IContainerStorageService> = {
uploadSummaryWithContext: async (summary: ISummaryTree, context: ISummaryContext) => {
return "fakeHandle";
},
Expand All @@ -251,7 +252,7 @@ describe("Runtime", () => {
params: {
settings?: Record<string, ConfigTypes>;
logger?: ITelemetryBaseLogger;
mockStorage?: Partial<IRuntimeStorageService>;
mockStorage?: Partial<IContainerStorageService>;
loadedFromVersion?: IVersion;
baseSnapshot?: ISnapshotTree;
connected?: boolean;
Expand Down Expand Up @@ -298,7 +299,7 @@ describe("Runtime", () => {
},
clientId,
connected,
storage: mockStorage as IRuntimeStorageService,
storage: mockStorage as IContainerStorageService,
baseSnapshot,
} satisfies Partial<IContainerContext>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ declare type old_as_current_for_Interface_LoadContainerRuntimeParams = requireAs
* typeValidation.broken:
* "Interface_LoadContainerRuntimeParams": {"backCompat": false}
*/
// @ts-expect-error compatibility expected to be broken
declare type current_as_old_for_Interface_LoadContainerRuntimeParams = requireAssignableTo<TypeOnly<current.LoadContainerRuntimeParams>, TypeOnly<old.LoadContainerRuntimeParams>>

/*
Expand Down
Loading
Loading