Skip to content

Commit 9212b86

Browse files
agarwal-navinanthony-murphy-agent
authored andcommitted
(compat) Removed deprecated properties from IContainerStorageService and IRuntimeStorageService (microsoft#25708)
## Description Removed deprecated properties 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` ## Breaking Changes This is a breaking change. The deprecations were announced in release 2.52.0 [here](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.52.0).
1 parent 43fbdaf commit 9212b86

File tree

22 files changed

+93
-258
lines changed

22 files changed

+93
-258
lines changed

.changeset/heavy-bugs-thank.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
"@fluidframework/container-definitions": minor
3+
"@fluidframework/runtime-definitions": minor
4+
"__section": breaking
5+
---
6+
Deprecated properties have been removed from IRuntimeStorageService and IContainerStorageService
7+
8+
The following deprecated properties have been removed from `IRuntimeStorageService`:
9+
10+
- `createBlob`
11+
- `dispose`
12+
- `disposed`
13+
- `downloadSummary`
14+
- `getSnapshot`
15+
- `getSnapshotTree`
16+
- `getVersions`
17+
- `policies`
18+
- `uploadSummaryWithContext`
19+
20+
The following deprecated properties have been removed from `IContainerStorageService`:
21+
22+
- `dispose`
23+
- `disposed`
24+
- `downloadSummary`
25+
26+
Please see [this Github issue](https://github.com/microsoft/FluidFramework/issues/25069) for more details.

packages/common/container-definitions/api-report/container-definitions.legacy.beta.api.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,6 @@ export type IContainerPolicies = {
209209
// @beta @legacy
210210
export interface IContainerStorageService {
211211
createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;
212-
// @deprecated
213-
dispose?(error?: Error): void;
214-
// @deprecated
215-
readonly disposed?: boolean;
216-
// @deprecated
217-
downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
218212
getSnapshot?(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;
219213
getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;
220214
getVersions(versionId: string | null, count: number, scenarioName?: string, fetchSource?: FetchSource): Promise<IVersion[]>;

packages/common/container-definitions/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,14 @@
110110
"typescript": "~5.4.5"
111111
},
112112
"typeValidation": {
113-
"broken": {},
113+
"broken": {
114+
"Interface_IContainerContext": {
115+
"backCompat": false
116+
},
117+
"Interface_IContainerStorageService": {
118+
"backCompat": false
119+
}
120+
},
114121
"entrypoint": "legacy"
115122
}
116123
}

packages/common/container-definitions/src/runtime.ts

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import type {
2626
ISnapshotFetchOptions,
2727
FetchSource,
2828
IDocumentStorageServicePolicies,
29-
ISummaryHandle,
3029
} from "@fluidframework/driver-definitions/internal";
3130

3231
import type { IAudience } from "./audience.js";
@@ -143,25 +142,6 @@ export interface IBatchMessage {
143142
* @legacy @beta
144143
*/
145144
export interface IContainerStorageService {
146-
/**
147-
* Whether or not the object has been disposed.
148-
* If true, the object should be considered invalid, and its other state should be disregarded.
149-
*
150-
* @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as
151-
* it is unused in the Runtime layer.
152-
*/
153-
readonly disposed?: boolean;
154-
155-
/**
156-
* Dispose of the object and its resources.
157-
* @param error - Optional error indicating the reason for the disposal, if the object was
158-
* disposed as the result of an error.
159-
*
160-
* @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as
161-
* it is unused in the Runtime layer.
162-
*/
163-
dispose?(error?: Error): void;
164-
165145
/**
166146
* Policies implemented/instructed by driver.
167147
*
@@ -230,15 +210,6 @@ export interface IContainerStorageService {
230210
* Returns the uploaded summary handle.
231211
*/
232212
uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;
233-
234-
/**
235-
* Retrieves the commit that matches the packfile handle. If the packfile has already been committed and the
236-
* server has deleted it this call may result in a broken promise.
237-
*
238-
* @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as
239-
* it is unused in the Runtime and below layers.
240-
*/
241-
downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
242213
}
243214

244215
/**

packages/common/container-definitions/src/test/types/validateContainerDefinitionsPrevious.generated.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ declare type old_as_current_for_Interface_IContainerContext = requireAssignableT
211211
* typeValidation.broken:
212212
* "Interface_IContainerContext": {"backCompat": false}
213213
*/
214+
// @ts-expect-error compatibility expected to be broken
214215
declare type current_as_old_for_Interface_IContainerContext = requireAssignableTo<TypeOnly<current.IContainerContext>, TypeOnly<old.IContainerContext>>
215216

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

270272
/*

packages/framework/aqueduct/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@
154154
"typescript": "~5.4.5"
155155
},
156156
"typeValidation": {
157-
"broken": {},
157+
"broken": {
158+
"Interface_IDataObjectProps": {
159+
"backCompat": false
160+
}
161+
},
158162
"entrypoint": "legacy"
159163
}
160164
}

packages/framework/aqueduct/src/test/types/validateAqueductPrevious.generated.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,4 +319,5 @@ declare type old_as_current_for_Interface_IDataObjectProps = requireAssignableTo
319319
* typeValidation.broken:
320320
* "Interface_IDataObjectProps": {"backCompat": false}
321321
*/
322+
// @ts-expect-error compatibility expected to be broken
322323
declare type current_as_old_for_Interface_IDataObjectProps = requireAssignableTo<TypeOnly<current.IDataObjectProps>, TypeOnly<old.IDataObjectProps>>

packages/loader/container-loader/src/containerStorageAdapter.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type {
1010
} from "@fluidframework/container-definitions/internal";
1111
import type { IDisposable } from "@fluidframework/core-interfaces";
1212
import { assert } from "@fluidframework/core-utils/internal";
13-
import type { ISummaryHandle, ISummaryTree } from "@fluidframework/driver-definitions";
13+
import type { ISummaryTree } from "@fluidframework/driver-definitions";
1414
import type {
1515
FetchSource,
1616
IDocumentService,
@@ -247,16 +247,6 @@ export class ContainerStorageAdapter
247247
public async createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse> {
248248
return this._storageService.createBlob(file);
249249
}
250-
251-
/**
252-
* {@link IRuntimeStorageService.downloadSummary}.
253-
*
254-
* @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as
255-
* it is unused in the Runtime and below layers.
256-
*/
257-
public async downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree> {
258-
return this._storageService.downloadSummary(handle);
259-
}
260250
}
261251

262252
/**

packages/runtime/container-runtime-definitions/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,14 @@
101101
"typescript": "~5.4.5"
102102
},
103103
"typeValidation": {
104-
"broken": {},
104+
"broken": {
105+
"Interface_IContainerRuntime": {
106+
"backCompat": false
107+
},
108+
"Interface_IContainerRuntimeWithResolveHandle_Deprecated": {
109+
"backCompat": false
110+
}
111+
},
105112
"entrypoint": "legacy"
106113
}
107114
}

packages/runtime/container-runtime-definitions/src/test/types/validateContainerRuntimeDefinitionsPrevious.generated.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ declare type MakeUnusedImportErrorsGoAway<T> = TypeOnly<T> | MinimalType<T> | Fu
2222
* typeValidation.broken:
2323
* "Interface_IContainerRuntime": {"backCompat": false}
2424
*/
25+
// @ts-expect-error compatibility expected to be broken
2526
declare type current_as_old_for_Interface_IContainerRuntime = requireAssignableTo<TypeOnly<current.IContainerRuntime>, TypeOnly<old.IContainerRuntime>>
2627

2728
/*
@@ -49,6 +50,7 @@ declare type old_as_current_for_Interface_IContainerRuntimeWithResolveHandle_Dep
4950
* typeValidation.broken:
5051
* "Interface_IContainerRuntimeWithResolveHandle_Deprecated": {"backCompat": false}
5152
*/
53+
// @ts-expect-error compatibility expected to be broken
5254
declare type current_as_old_for_Interface_IContainerRuntimeWithResolveHandle_Deprecated = requireAssignableTo<TypeOnly<current.IContainerRuntimeWithResolveHandle_Deprecated>, TypeOnly<old.IContainerRuntimeWithResolveHandle_Deprecated>>
5355

5456
/*

0 commit comments

Comments
 (0)