Skip to content

Commit

Permalink
chore: Review all @experimental annotations (#1622)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjameswh authored Feb 7, 2025
1 parent 5903113 commit b92cb97
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 72 deletions.
16 changes: 8 additions & 8 deletions packages/client/src/build-id-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { temporal } from '@temporalio/proto';
/**
* Operations that can be passed to {@link TaskQueueClient.updateBuildIdCompatibility}.
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export type BuildIdOperation =
| AddNewIdInNewDefaultSet
Expand All @@ -16,7 +16,7 @@ export type BuildIdOperation =
* Adds a new Build Id into a new set, which will be used as the default set for
* the queue. This means all new workflows will start on this Build Id.
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export interface AddNewIdInNewDefaultSet {
operation: 'addNewIdInNewDefaultSet';
Expand All @@ -28,7 +28,7 @@ export interface AddNewIdInNewDefaultSet {
* the default for that compatible set, and thus new workflow tasks for workflows which have been
* executing on workers in that set will now start on this new Build Id.
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export interface AddNewCompatibleVersion {
operation: 'addNewCompatibleVersion';
Expand All @@ -47,7 +47,7 @@ export interface AddNewCompatibleVersion {
* default set for the task queue. Any Build Id in the set may be used to
* target it.
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export interface PromoteSetByBuildId {
operation: 'promoteSetByBuildId';
Expand All @@ -58,7 +58,7 @@ export interface PromoteSetByBuildId {
* Promotes a Build Id within an existing set to become the default ID for that
* set.
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export interface PromoteBuildIdWithinSet {
operation: 'promoteBuildIdWithinSet';
Expand All @@ -70,7 +70,7 @@ export interface PromoteBuildIdWithinSet {
* compatible with one another. The default of the primary set is maintained as
* the merged set's overall default.
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export interface MergeSets {
operation: 'mergeSets';
Expand All @@ -84,7 +84,7 @@ export interface MergeSets {
* Represents the sets of compatible Build Id versions associated with some
* Task Queue, as fetched by {@link TaskQueueClient.getBuildIdCompatability}.
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export interface WorkerBuildIdVersionSets {
/**
Expand All @@ -108,7 +108,7 @@ export interface WorkerBuildIdVersionSets {
/**
* Represents one set of compatible Build Ids.
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export interface BuildIdVersionSet {
// All build IDs contained in the set.
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class Client extends BaseClient {
/**
* Task Queue sub-client - use to perform operations on Task Queues
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
public readonly taskQueue: TaskQueueClient;

Expand Down
9 changes: 0 additions & 9 deletions packages/client/src/grpc-retry.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { InterceptingCall, Interceptor, ListenerBuilder, RequesterBuilder, StatusObject } from '@grpc/grpc-js';
import * as grpc from '@grpc/grpc-js';

/**
* @experimental
*/
export interface GrpcRetryOptions {
/**
* A function which accepts the current retry attempt (starts at 1) and returns the millisecond
Expand All @@ -19,8 +16,6 @@ export interface GrpcRetryOptions {

/**
* Options for the backoff formula: `factor ^ attempt * initialIntervalMs(status) * jitter(maxJitter)`
*
* @experimental
*/
export interface BackoffOptions {
/**
Expand Down Expand Up @@ -79,8 +74,6 @@ function withDefaultBackoffOptions({

/**
* Generates the default retry behavior based on given backoff options
*
* @experimental
*/
export function defaultGrpcRetryOptions(options: Partial<BackoffOptions> = {}): GrpcRetryOptions {
const { maxAttempts, factor, maxJitter, initialIntervalMs, maxIntervalMs } = withDefaultBackoffOptions(options);
Expand Down Expand Up @@ -165,8 +158,6 @@ function defaultInitialIntervalMs({ code }: StatusObject) {
* Returns a GRPC interceptor that will perform automatic retries for some types of failed calls
*
* @param retryOptions Options for the retry interceptor
*
* @experimental
*/
export function makeGrpcRetryInterceptor(retryOptions: GrpcRetryOptions): Interceptor {
return (options, nextCall) => {
Expand Down
10 changes: 5 additions & 5 deletions packages/client/src/task-queue-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ type IUpdateWorkerBuildIdCompatibilityRequest =
type GetWorkerTaskReachabilityResponse = temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse;

/**
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export type TaskQueueClientOptions = BaseClientOptions;

/**
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export type LoadedTaskQueueClientOptions = LoadedWithDefaults<TaskQueueClientOptions>;

/**
* A stand-in for a Build Id for unversioned Workers
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export const UnversionedBuildId = Symbol.for('__temporal_unversionedBuildId');
export type UnversionedBuildIdType = typeof UnversionedBuildId;

/**
* Client for starting Workflow executions and creating Workflow handles
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export class TaskQueueClient extends BaseClient {
public readonly options: LoadedTaskQueueClientOptions;
Expand Down Expand Up @@ -285,7 +285,7 @@ export function reachabilityResponseFromProto(resp: GetWorkerTaskReachabilityRes
* - Id passed is incorrect
* - Build Id has been scavenged by the server.
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
@SymbolBasedInstanceOfError('BuildIdNotFoundError')
export class BuildIdNotFoundError extends Error {}
8 changes: 4 additions & 4 deletions packages/cloud/src/cloud-operations-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import pkg from './pkg';
import { CloudService } from './types';

/**
* @experimental
* @experimental The Temporal Cloud Operations Client API is an experimental feature and may be subject to change.
*/
export interface CloudOperationsClientOptions {
/**
Expand All @@ -37,7 +37,7 @@ export interface CloudOperationsClientOptions {
/**
* High level client for the Temporal Cloud API.
*
* @experimental
* @experimental The Temporal Cloud Operations Client API is an experimental feature and may be subject to change.
*/
export class CloudOperationsClient {
/**
Expand Down Expand Up @@ -131,7 +131,7 @@ export class CloudOperationsClient {
}

/**
* @experimental
* @experimental The Temporal Cloud Operations Client API is an experimental feature and may be subject to change.
*/
export interface CloudOperationsConnectionOptions {
/**
Expand Down Expand Up @@ -288,7 +288,7 @@ interface CloudOperationsConnectionCtorOptions {
* ⚠️ Connections are expensive to construct and should be reused.
* Make sure to {@link close} any unused connections to avoid leaking resources.
*
* @experimental
* @experimental The Temporal Cloud Operations Client API is an experimental feature and may be subject to change.
*/
export class CloudOperationsConnection {
private static readonly Client = grpc.makeGenericClientConstructor({}, 'CloudService', {});
Expand Down
4 changes: 3 additions & 1 deletion packages/cloud/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/** @experimental */
/**
* @experimental The Temporal Cloud Operations Client API is an experimental feature and may be subject to change.
*/
export {
CloudOperationsClient,
CloudOperationsConnection,
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/activity-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export interface ActivityOptions {
*
* @default 'COMPATIBLE'
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
versioningIntent?: VersioningIntent;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/versioning-intent-enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { assertNever, checkExtends } from './type-helpers';
/**
* Protobuf enum representation of {@link VersioningIntentString}.
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export enum VersioningIntent {
UNSPECIFIED = 0,
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/versioning-intent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
* current worker. The default behavior for starting Workflows is `DEFAULT`. The default behavior for Workflows starting
* Activities, starting Child Workflows, or Continuing As New is `COMPATIBLE`.
*
* @experimental
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export type VersioningIntent = 'COMPATIBLE' | 'DEFAULT';
20 changes: 1 addition & 19 deletions packages/core-bridge/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ export interface ClientOptions {

/**
* Proxying configuration.
*
* @experimental
*/
proxy?: ProxyConfig;

Expand All @@ -103,17 +101,13 @@ export interface ClientOptions {

/**
* Log directly to console
*
* @experimental
*/
export interface ConsoleLogger {
console: {}; // eslint-disable-line @typescript-eslint/no-empty-object-type
}

/**
* Forward logs to {@link Runtime} logger
*
* @experimental
*/
export interface ForwardLogger {
forward: {
Expand All @@ -128,15 +122,11 @@ export interface ForwardLogger {

/**
* Logger types supported by Core
*
* @experimental
*/
export type Logger = ConsoleLogger | ForwardLogger;

/**
* OpenTelemetry Collector options for exporting metrics or traces
*
* @experimental
*/
export interface OtelCollectorExporter {
otel: {
Expand Down Expand Up @@ -171,7 +161,6 @@ export interface OtelCollectorExporter {
};
}

/** @experimental */
export type CompiledOtelMetricsExporter = Shadow<
OtelCollectorExporter,
{
Expand All @@ -181,8 +170,6 @@ export type CompiledOtelMetricsExporter = Shadow<

/**
* Prometheus metrics exporter options
*
* @experimental
*/
export interface PrometheusMetricsExporter {
prometheus: {
Expand Down Expand Up @@ -215,14 +202,11 @@ export interface PrometheusMetricsExporter {
* `temporality` is the type of aggregation temporality for metric export. Applies to both Prometheus and OpenTelemetry exporters.
*
* See the [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/ce50e4634efcba8da445cc23523243cb893905cb/specification/metrics/datamodel.md#temporality) for more information.
*
* @experimental
*/
export type MetricsExporter = {
temporality?: 'cumulative' | 'delta';
} & (PrometheusMetricsExporter | OtelCollectorExporter);

/** @experimental */
export interface TelemetryOptions {
/**
* A string in the env filter format specified here:
Expand All @@ -235,8 +219,7 @@ export interface TelemetryOptions {
tracingFilter?: string;

/**
* If set true, do not prefix metrics with `temporal_`. Will be removed eventually as
* the prefix is consistent with other SDKs.
* If set true, do not prefix metrics with `temporal_`.
*
* @default `false`
*/
Expand Down Expand Up @@ -278,7 +261,6 @@ export interface TelemetryOptions {
tracing?: unknown;
}

/** @experimental */
export type CompiledTelemetryOptions = {
noTemporalPrefixForMetrics?: boolean;
logging: {
Expand Down
Loading

0 comments on commit b92cb97

Please sign in to comment.