Skip to content

Commit 9b3ec22

Browse files
authored
Deprecate versioning intent (#1728)
1 parent caae0a4 commit 9b3ec22

File tree

7 files changed

+16
-9
lines changed

7 files changed

+16
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
# Run integration tests.
106106
# Uses the native binaries built in compile-native-binaries, but build `@temporalio/*` packages locally.
107107
integration-tests:
108-
timeout-minutes: 15
108+
timeout-minutes: 20
109109
needs:
110110
- compile-native-binaries-debug
111111
strategy:

packages/common/src/activity-options.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,10 @@ export interface ActivityOptions {
120120
*
121121
* @default 'COMPATIBLE'
122122
*
123+
* @deprecated In favor of the new Worker Deployment API.
123124
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
124125
*/
125-
versioningIntent?: VersioningIntent;
126+
versioningIntent?: VersioningIntent; // eslint-disable-line deprecation/deprecation
126127

127128
/**
128129
* Priority of this activity

packages/common/src/versioning-intent-enum.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ import type { coresdk } from '@temporalio/proto';
22
import type { VersioningIntent as VersioningIntentString } from './versioning-intent';
33
import { assertNever, checkExtends } from './type-helpers';
44

5+
/* eslint-disable deprecation/deprecation */
6+
57
// Avoid importing the proto implementation to reduce workflow bundle size
68
// Copied from coresdk.common.VersioningIntent
79
/**
810
* Protobuf enum representation of {@link VersioningIntentString}.
911
*
12+
* @deprecated In favor of the new Worker Deployment API.
1013
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
1114
*/
1215
export enum VersioningIntent {

packages/common/src/versioning-intent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* current worker. The default behavior for starting Workflows is `DEFAULT`. The default behavior for Workflows starting
1212
* Activities, starting Child Workflows, or Continuing As New is `COMPATIBLE`.
1313
*
14+
* @deprecated In favor of the new Worker Deployment API.
1415
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
1516
*/
1617
export type VersioningIntent = 'COMPATIBLE' | 'DEFAULT';

packages/core-bridge/src/metrics.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use crate::helpers::{
2121
BridgeError, BridgeResult, JsonString, MutableFinalize, OpaqueInboundHandle,
2222
OpaqueOutboundHandle,
2323
};
24-
use crate::runtime::*;
24+
use crate::runtime::Runtime;
2525

2626
pub fn init(cx: &mut neon::prelude::ModuleContext) -> neon::prelude::NeonResult<()> {
2727
cx.export_function("newMetricCounter", new_metric_counter)?;
@@ -91,10 +91,10 @@ pub enum MetricValue {
9191
impl From<MetricValue> for CoreMetricValue {
9292
fn from(value: MetricValue) -> Self {
9393
match value {
94-
MetricValue::Int(i) => CoreMetricValue::Int(i),
95-
MetricValue::Float(f) => CoreMetricValue::Float(f),
96-
MetricValue::Bool(b) => CoreMetricValue::Bool(b),
97-
MetricValue::String(s) => CoreMetricValue::String(s),
94+
MetricValue::Int(i) => Self::Int(i),
95+
MetricValue::Float(f) => Self::Float(f),
96+
MetricValue::Bool(b) => Self::Bool(b),
97+
MetricValue::String(s) => Self::String(s),
9898
}
9999
}
100100
}

packages/workflow/src/interfaces.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ export interface ContinueAsNewOptions {
322322
*
323323
* @default 'COMPATIBLE'
324324
*
325+
* @deprecated In favor of the new Worker Deployment API.
325326
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
326327
*/
327328
versioningIntent?: VersioningIntent;
@@ -492,6 +493,7 @@ export interface ChildWorkflowOptions extends Omit<CommonWorkflowOptions, 'workf
492493
*
493494
* @default 'COMPATIBLE'
494495
*
496+
* @deprecated In favor of the new Worker Deployment API.
495497
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
496498
*/
497499
versioningIntent?: VersioningIntent;

packages/workflow/src/workflow.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ function startChildWorkflowExecutionNextHandler({
396396
? encodeUnifiedSearchAttributes(options.searchAttributes, options.typedSearchAttributes) // eslint-disable-line deprecation/deprecation
397397
: undefined,
398398
memo: options.memo && mapToPayloads(activator.payloadConverter, options.memo),
399-
versioningIntent: versioningIntentToProto(options.versioningIntent),
399+
versioningIntent: versioningIntentToProto(options.versioningIntent), // eslint-disable-line deprecation/deprecation
400400
priority: options.priority ? compilePriority(options.priority) : undefined,
401401
},
402402
});
@@ -941,7 +941,7 @@ export function makeContinueAsNewFunc<F extends Workflow>(
941941
: undefined,
942942
workflowRunTimeout: msOptionalToTs(options.workflowRunTimeout),
943943
workflowTaskTimeout: msOptionalToTs(options.workflowTaskTimeout),
944-
versioningIntent: versioningIntentToProto(options.versioningIntent),
944+
versioningIntent: versioningIntentToProto(options.versioningIntent), // eslint-disable-line deprecation/deprecation
945945
});
946946
});
947947
return fn({

0 commit comments

Comments
 (0)