Skip to content

Commit

Permalink
IContainerContext removals (#16262)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChumpChief authored Jul 7, 2023
1 parent da246ca commit 3fb1e20
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 64 deletions.
7 changes: 7 additions & 0 deletions .changeset/wild-planets-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@fluidframework/container-definitions": major
---

IContainerContext members removed

IContainerContext members disposed, dispose(), serviceConfiguration, and id were deprecated in 2.0.0-internal.5.2.0 and have now been removed.
8 changes: 0 additions & 8 deletions api-report/container-definitions.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,13 @@ export interface IContainerContext {
readonly connected: boolean;
// (undocumented)
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
// @deprecated (undocumented)
dispose(error?: Error): void;
// @deprecated (undocumented)
readonly disposed: boolean;
// (undocumented)
readonly disposeFn?: (error?: ICriticalContainerError) => void;
getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;
// (undocumented)
getLoadedFromVersion(): IVersion | undefined;
// @deprecated (undocumented)
getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;
// @deprecated
readonly id: string;
// (undocumented)
readonly loader: ILoader;
// (undocumented)
Expand All @@ -181,8 +175,6 @@ export interface IContainerContext {
// (undocumented)
readonly quorum: IQuorumClients;
readonly scope: FluidObject;
// @deprecated (undocumented)
readonly serviceConfiguration: IClientConfiguration | undefined;
// (undocumented)
readonly storage: IDocumentStorageService;
// (undocumented)
Expand Down
27 changes: 0 additions & 27 deletions packages/common/container-definitions/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {

import { IDocumentStorageService } from "@fluidframework/driver-definitions";
import {
IClientConfiguration,
IClientDetails,
ISequencedDocumentMessage,
ISnapshotTree,
Expand Down Expand Up @@ -172,11 +171,6 @@ export interface IContainerContext {
readonly loader: ILoader;
// The logger implementation, which would support tagged events, should be provided by the loader.
readonly taggedLogger: ITelemetryBaseLogger;
/**
* @deprecated - 2.0.0-internal.5.2.0 - This property is redundant, and is unused by the runtime. The same information can be found via
* deltaManager.serviceConfiguration on this object if it is necessary.
*/
readonly serviceConfiguration: IClientConfiguration | undefined;
pendingLocalState?: unknown;

/**
Expand All @@ -202,27 +196,6 @@ export interface IContainerContext {
updateDirtyContainerState(dirty: boolean): void;

readonly supportedFeatures?: ReadonlyMap<string, unknown>;

/**
* WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption
* This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers
* and scenarios which can change in the future.
* @deprecated - 2.0.0-internal.5.2.0 - The docId is already logged by the IContainerContext.taggedLogger for
* telemetry purposes, so this is generally unnecessary for telemetry. If the id is needed for other purposes
* it should be passed to the consumer explicitly. This member will be removed in an upcoming release.
*/
readonly id: string;

/**
* @deprecated - 2.0.0-internal.5.2.0 - The disposed state on the IContainerContext is not meaningful to the runtime.
* This member will be removed in an upcoming release.
*/
readonly disposed: boolean;
/**
* @deprecated - 2.0.0-internal.5.2.0 - The runtime is not permitted to dispose the IContainerContext, this results
* in an inconsistent system state. This member will be removed in an upcoming release.
*/
dispose(error?: Error): void;
}

export const IRuntimeFactory: keyof IProvideRuntimeFactory = "IRuntimeFactory";
Expand Down
5 changes: 0 additions & 5 deletions packages/loader/container-loader/src/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2338,9 +2338,7 @@ export class Container
(error?: ICriticalContainerError) => this.close(error),
this.updateDirtyContainerState,
this.getAbsoluteUrl,
() => this.resolvedUrl?.id,
() => this.clientId,
() => this._deltaManager.serviceConfiguration,
() => this.attachState,
() => this.connected,
getSpecifiedCodeDetails,
Expand All @@ -2349,9 +2347,6 @@ export class Container
this.subLogger,
pendingLocalState,
);
this._lifecycleEvents.once("disposed", () => {
context.dispose();
});

this._runtime = await PerformanceEvent.timedExecAsync(
this.subLogger,
Expand Down
24 changes: 0 additions & 24 deletions packages/loader/container-loader/src/containerContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
import { FluidObject } from "@fluidframework/core-interfaces";
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
import {
IClientConfiguration,
IClientDetails,
IDocumentMessage,
IQuorumClients,
Expand Down Expand Up @@ -46,13 +45,6 @@ export class ContainerContext implements IContainerContext {
return this._getClientId();
}

/**
* DISCLAIMER: this id is only for telemetry purposes. Not suitable for any other usages.
*/
public get id(): string {
return this._getContainerDiagnosticId() ?? "";
}

/**
* When true, ops are free to flow
* When false, ops should be kept as pending or rejected
Expand All @@ -61,16 +53,6 @@ export class ContainerContext implements IContainerContext {
return this._getConnected();
}

public get serviceConfiguration(): IClientConfiguration | undefined {
return this._getServiceConfiguration();
}

private _disposed = false;

public get disposed() {
return this._disposed;
}

constructor(
public readonly options: ILoaderOptions,
public readonly scope: FluidObject,
Expand Down Expand Up @@ -101,9 +83,7 @@ export class ContainerContext implements IContainerContext {
public readonly closeFn: (error?: ICriticalContainerError) => void,
public readonly updateDirtyContainerState: (dirty: boolean) => void,
public readonly getAbsoluteUrl: (relativeUrl: string) => Promise<string | undefined>,
private readonly _getContainerDiagnosticId: () => string | undefined,
private readonly _getClientId: () => string | undefined,
private readonly _getServiceConfiguration: () => IClientConfiguration | undefined,
private readonly _getAttachState: () => AttachState,
private readonly _getConnected: () => boolean,
public readonly getSpecifiedCodeDetails: () => IFluidCodeDetails | undefined,
Expand All @@ -113,10 +93,6 @@ export class ContainerContext implements IContainerContext {
public readonly pendingLocalState?: unknown,
) {}

public dispose(error?: Error): void {
this._disposed = true;
}

public getLoadedFromVersion(): IVersion | undefined {
return this._version;
}
Expand Down

0 comments on commit 3fb1e20

Please sign in to comment.