Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate unnecessary exports of container-runtime package #23607

Merged
merged 21 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
fbb556c
Mark removed and deprecated
anthony-murphy Jan 17, 2025
ac64436
deprecations lints
anthony-murphy Jan 17, 2025
984f5cb
add things back
anthony-murphy Jan 17, 2025
3202af7
Merge branch 'main' of https://github.com/microsoft/FluidFramework in…
anthony-murphy Jan 17, 2025
899ddc8
fix tagging
anthony-murphy Jan 17, 2025
ddd4188
revert some changes
anthony-murphy Jan 17, 2025
fbb55fa
add changeset
anthony-murphy Jan 17, 2025
dfe2e21
Merge branch 'main' of https://github.com/microsoft/FluidFramework in…
anthony-murphy Jan 17, 2025
c72de80
Merge branch 'main' of https://github.com/microsoft/FluidFramework in…
anthony-murphy Jan 17, 2025
1db84ee
Apply suggestions from code review
anthony-murphy Jan 17, 2025
611033c
clean up lints
anthony-murphy Jan 21, 2025
9474486
Merge branch 'main' into test/container-runtime-deprecations
anthony-murphy Jan 21, 2025
4bae889
Merge branch 'main' of https://github.com/microsoft/FluidFramework in…
anthony-murphy Jan 22, 2025
8e3ec4e
remove deprecation
anthony-murphy Jan 22, 2025
876735f
mend
anthony-murphy Jan 22, 2025
226ff03
mend
anthony-murphy Jan 22, 2025
ba5ca11
Merge branch 'main' of https://github.com/microsoft/FluidFramework in…
anthony-murphy Jan 22, 2025
8be9540
Pr feedback
anthony-murphy Jan 22, 2025
ed43ff2
Update packages/runtime/container-runtime/src/containerRuntime.ts
anthony-murphy Jan 23, 2025
e277b55
Merge branch 'main' of https://github.com/microsoft/FluidFramework in…
anthony-murphy Jan 23, 2025
afa4456
Merge branch 'main' of https://github.com/microsoft/FluidFramework in…
anthony-murphy Jan 23, 2025
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
40 changes: 40 additions & 0 deletions .changeset/many-gifts-strive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
"@fluidframework/container-runtime": minor
---
---
"section": deprecation
---

Deprecate unnecessary exports of container-runtime package

The following types in the `@fluidframework/container-runtime` are deprecated. These types are unnecessary for external users of this package.

- currentDocumentVersionSchema
- DeletedResponseHeaderKey
- DocumentSchemaValueType
- DocumentsSchemaController
- GCFeatureMatrix
- GCNodeType
- GCVersion
- IBlobManagerLoadInfo
- ICancellableSummarizerController
- ICancellationToken
- IConnectableRuntime
- IContainerRuntimeMetadata
- ICreateContainerMetadata
- IDocumentSchema
- IDocumentSchemaChangeMessage
- IDocumentSchemaCurrent
- IDocumentSchemaFeatures
- IGCMetadata
- IGCStats
- IMarkPhaseStats
- IRefreshSummaryAckOptions
- ISerializedElection
- ISubmitSummaryOptions
- ISummarizerInternalsProvider
- ISummarizerRuntime
- ISummaryCancellationToken
- ISummaryMetadataMessage
- ISweepPhaseStats
- Summarizer
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ export enum ContainerMessageType {
Rejoin = "rejoin"
}

// @alpha
// @alpha @deprecated
export const currentDocumentVersionSchema = 1;

// @alpha (undocumented)
export const DefaultSummaryConfiguration: ISummaryConfiguration;

// @alpha
// @alpha @deprecated
export const DeletedResponseHeaderKey = "wasDeleted";

// @alpha (undocumented)
export const disabledCompressionConfig: ICompressionRuntimeOptions;

// @alpha
// @alpha @deprecated
export type DocumentSchemaValueType = string | string[] | true | number | undefined;

// @alpha @sealed
// @alpha @sealed @deprecated
export class DocumentsSchemaController {
constructor(existing: boolean, snapshotSequenceNumber: number, documentMetadataSchema: IDocumentSchema | undefined, features: IDocumentSchemaFeatures, onSchemaChange: (schema: IDocumentSchemaCurrent) => void);
maybeSendSchemaMessage(): IDocumentSchemaChangeMessage | undefined;
Expand All @@ -73,26 +73,26 @@ export type EnqueueSummarizeResult = (ISummarizeResults & {
readonly overridden?: undefined;
};

// @alpha (undocumented)
// @alpha @deprecated (undocumented)
export type GCFeatureMatrix = {
gcGeneration?: number;
tombstoneGeneration?: undefined;
} | {
tombstoneGeneration: number;
};

// @alpha
// @alpha @deprecated
export const GCNodeType: {
readonly DataStore: "DataStore";
readonly SubDataStore: "SubDataStore";
readonly Blob: "Blob";
readonly Other: "Other";
};

// @alpha (undocumented)
// @alpha @deprecated (undocumented)
export type GCNodeType = (typeof GCNodeType)[keyof typeof GCNodeType];

// @alpha (undocumented)
// @alpha @deprecated (undocumented)
export type GCVersion = number;

// @alpha
Expand Down Expand Up @@ -121,7 +121,7 @@ export interface IBaseSummarizeResult {
readonly stage: "base";
}

// @alpha
// @alpha @deprecated
export interface IBlobManagerLoadInfo {
// (undocumented)
ids?: string[];
Expand All @@ -137,13 +137,13 @@ export interface IBroadcastSummaryResult {
readonly summarizeOp: ISummaryOpMessage;
}

// @alpha
// @alpha @deprecated
export interface ICancellableSummarizerController extends ISummaryCancellationToken {
// (undocumented)
stop(reason: SummarizerStopReason): void;
}

// @alpha
// @alpha @deprecated
export interface ICancellationToken<T> {
readonly cancelled: boolean;
readonly waitCancelled: Promise<T>;
Expand All @@ -163,7 +163,7 @@ export interface ICompressionRuntimeOptions {
readonly minimumBatchSizeInBytes: number;
}

// @alpha (undocumented)
// @alpha @deprecated (undocumented)
export interface IConnectableRuntime {
// (undocumented)
readonly clientId: string | undefined;
Expand All @@ -175,7 +175,7 @@ export interface IConnectableRuntime {
once(event: "connected" | "disconnected" | "dispose", listener: () => void): this;
}

// @alpha (undocumented)
// @alpha @deprecated (undocumented)
export interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGCMetadata {
readonly disableIsolatedChannels?: true;
// (undocumented)
Expand Down Expand Up @@ -205,7 +205,7 @@ export interface IContainerRuntimeOptions {
readonly summaryOptions?: ISummaryRuntimeOptions;
}

// @alpha (undocumented)
// @alpha @deprecated (undocumented)
export interface ICreateContainerMetadata {
createContainerRuntimeVersion?: string;
createContainerTimestamp?: number;
Expand All @@ -214,7 +214,7 @@ export interface ICreateContainerMetadata {
// @alpha
export type IdCompressorMode = "on" | "delayed" | undefined;

// @alpha
// @alpha @deprecated
export interface IDocumentSchema {
// (undocumented)
refSeq: number;
Expand All @@ -224,10 +224,10 @@ export interface IDocumentSchema {
version: number;
}

// @alpha
// @alpha @deprecated
export type IDocumentSchemaChangeMessage = IDocumentSchema;

// @alpha
// @alpha @deprecated
export type IDocumentSchemaCurrent = {
version: 1;
refSeq: number;
Expand All @@ -236,7 +236,7 @@ export type IDocumentSchemaCurrent = {
};
};

// @alpha
// @alpha @deprecated
export interface IDocumentSchemaFeatures {
// (undocumented)
compressionLz4: boolean;
Expand Down Expand Up @@ -282,7 +282,7 @@ export interface IFluidDataStoreAttributes2 extends OmitAttributesVersions<IFlui
readonly summaryFormatVersion: 2;
}

// @alpha
// @alpha @deprecated
export interface IGCMetadata {
readonly gcFeature?: GCVersion;
readonly gcFeatureMatrix?: GCFeatureMatrix;
Expand All @@ -301,7 +301,7 @@ export interface IGCRuntimeOptions {
sweepGracePeriodMs?: number;
}

// @alpha
// @alpha @deprecated
export interface IGCStats extends IMarkPhaseStats, ISweepPhaseStats {
}

Expand All @@ -324,7 +324,7 @@ export interface IGenerateSummaryTreeResult extends Omit<IBaseSummarizeResult, "
readonly summaryTree: ISummaryTree;
}

// @alpha
// @alpha @deprecated
export interface IMarkPhaseStats {
attachmentBlobCount: number;
dataStoreCount: number;
Expand Down Expand Up @@ -354,7 +354,7 @@ export interface IOnDemandSummarizeOptions extends ISummarizeOptions {
readonly retryOnFailure?: boolean;
}

// @alpha
// @alpha @deprecated
export interface IRefreshSummaryAckOptions {
readonly ackHandle: string;
readonly proposalHandle: string | undefined;
Expand All @@ -368,7 +368,7 @@ export interface IRetriableFailureError extends Error {
readonly retryAfterSeconds?: number;
}

// @alpha
// @alpha @deprecated
export interface ISerializedElection {
readonly electedClientId: string | undefined;
readonly electedParentId: string | undefined;
Expand All @@ -383,7 +383,7 @@ export interface ISubmitSummaryOpResult extends Omit<IUploadSummaryResult, "stag
readonly submitOpDuration: number;
}

// @alpha (undocumented)
// @alpha @deprecated (undocumented)
export interface ISubmitSummaryOptions extends ISummarizeOptions {
readonly cancellationToken: ISummaryCancellationToken;
readonly finalAttempt?: boolean;
Expand Down Expand Up @@ -416,13 +416,13 @@ export interface ISummarizeResults {
readonly summarySubmitted: Promise<SummarizeResultPart<SubmitSummaryResult, SubmitSummaryFailureData>>;
}

// @alpha (undocumented)
// @alpha @deprecated (undocumented)
export interface ISummarizerInternalsProvider {
refreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void>;
submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;
}

// @alpha (undocumented)
// @alpha @deprecated (undocumented)
export interface ISummarizerRuntime extends IConnectableRuntime {
// (undocumented)
readonly baseLogger: ITelemetryBaseLogger;
Expand Down Expand Up @@ -466,7 +466,7 @@ export interface ISummaryBaseConfiguration {
maxOpsSinceLastSummary: number;
}

// @alpha
// @alpha @deprecated
export type ISummaryCancellationToken = ICancellationToken<SummarizerStopReason>;

// @alpha (undocumented)
Expand Down Expand Up @@ -504,7 +504,7 @@ export interface ISummaryConfigurationHeuristics extends ISummaryBaseConfigurati
state: "enabled";
}

// @alpha
// @alpha @deprecated
export type ISummaryMetadataMessage = Pick<ISequencedDocumentMessage, "clientId" | "clientSequenceNumber" | "minimumSequenceNumber" | "referenceSequenceNumber" | "sequenceNumber" | "timestamp" | "type">;

// @alpha
Expand All @@ -530,7 +530,7 @@ export interface ISummaryRuntimeOptions {
summaryConfigOverrides?: ISummaryConfiguration;
}

// @alpha
// @alpha @deprecated
export interface ISweepPhaseStats {
deletedAttachmentBlobCount: number;
deletedDataStoreCount: number;
Expand Down Expand Up @@ -584,7 +584,7 @@ export interface SubmitSummaryFailureData {
// @alpha
export type SubmitSummaryResult = IBaseSummarizeResult | IGenerateSummaryTreeResult | IUploadSummaryResult | ISubmitSummaryOpResult;

// @alpha
// @alpha @deprecated
export class Summarizer extends TypedEventEmitter<ISummarizerEvents> implements ISummarizer {
constructor(
runtime: ISummarizerRuntime, configurationGetter: () => ISummaryConfiguration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import {
getStorageIds,
summarizeBlobManagerState,
toRedirectTable,
// eslint-disable-next-line import/no-deprecated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it help you to find/remove these if you put a keyword on these lines? Or... maybe you can just do git revert on this commit to start the removal branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm run lint:fix can remove them

type IBlobManagerLoadInfo,
} from "./blobManagerSnapSum.js";

Expand Down Expand Up @@ -187,6 +188,7 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {

constructor(props: {
readonly routeContext: IFluidHandleContext;
// eslint-disable-next-line import/no-deprecated
snapshot: IBlobManagerLoadInfo;
readonly getStorage: () => IDocumentStorageService;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import type { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/intern
* Information from a snapshot needed to load BlobManager
* @legacy
* @alpha
* @deprecated - This type will be moved to internal in 2.30. External usage is not necessary or supported.
anthony-murphy marked this conversation as resolved.
Show resolved Hide resolved
*/
export interface IBlobManagerLoadInfo {
ids?: string[];
Expand Down
8 changes: 8 additions & 0 deletions packages/runtime/container-runtime/src/channelCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ import {
import { v4 as uuid } from "uuid";

import {
// eslint-disable-next-line import/no-deprecated
DeletedResponseHeaderKey,
RuntimeHeaderData,
defaultRuntimeHeaderData,
Expand All @@ -96,10 +97,12 @@ import {
} from "./dataStoreContext.js";
import { DataStoreContexts } from "./dataStoreContexts.js";
import { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
// eslint-disable-next-line import/no-deprecated
import { GCNodeType, IGCNodeUpdatedProps, urlToGCNodePath } from "./gc/index.js";
import { ContainerMessageType, LocalContainerRuntimeMessage } from "./messageTypes.js";
import { StorageServiceWithAttachBlobs } from "./storageServiceWithAttachBlobs.js";
import {
// eslint-disable-next-line import/no-deprecated
IContainerRuntimeMetadata,
nonDataStorePaths,
rootHasIsolatedChannels,
Expand Down Expand Up @@ -985,6 +988,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
// The requested data store has been deleted by gc. Create a 404 response exception.
throw responseToException(
createResponseError(404, "DataStore was deleted", originalRequest, {
// eslint-disable-next-line import/no-deprecated
[DeletedResponseHeaderKey]: true,
}),
originalRequest,
Expand Down Expand Up @@ -1474,6 +1478,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
* Called by GC to determine if a node is for a data store or for an object within a data store (for e.g. DDS).
* @returns the GC node type if the node belongs to a data store or object within data store, undefined otherwise.
*/
// eslint-disable-next-line import/no-deprecated
public getGCNodeType(nodePath: string): GCNodeType | undefined {
const pathParts = nodePath.split("/");
if (!this.contexts.has(pathParts[1])) {
Expand All @@ -1483,8 +1488,10 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
// Data stores paths are of the format "/dataStoreId".
// Sub data store paths are of the format "/dataStoreId/subPath/...".
if (pathParts.length === 2) {
// eslint-disable-next-line import/no-deprecated
return GCNodeType.DataStore;
}
// eslint-disable-next-line import/no-deprecated
return GCNodeType.SubDataStore;
}

Expand Down Expand Up @@ -1549,6 +1556,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {

export function getSummaryForDatastores(
snapshot: ISnapshotTree | undefined,
// eslint-disable-next-line import/no-deprecated
metadata?: IContainerRuntimeMetadata,
): ISnapshotTree | undefined {
if (!snapshot) {
Expand Down
Loading
Loading