Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
3 changes: 2 additions & 1 deletion packages/common/src/activity-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ export interface ActivityOptions {
*
* @default 'COMPATIBLE'
*
* @deprecated In favor of the new Worker Deployment API.
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
versioningIntent?: VersioningIntent;
versioningIntent?: VersioningIntent; // eslint-disable-line deprecation/deprecation

/**
* Priority of this activity
Expand Down
3 changes: 3 additions & 0 deletions packages/common/src/versioning-intent-enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import type { coresdk } from '@temporalio/proto';
import type { VersioningIntent as VersioningIntentString } from './versioning-intent';
import { assertNever, checkExtends } from './type-helpers';

/* eslint-disable deprecation/deprecation */

// Avoid importing the proto implementation to reduce workflow bundle size
// Copied from coresdk.common.VersioningIntent
/**
* Protobuf enum representation of {@link VersioningIntentString}.
*
* @deprecated In favor of the new Worker Deployment API.
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export enum VersioningIntent {
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/versioning-intent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* 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`.
*
* @deprecated In favor of the new Worker Deployment API.
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
export type VersioningIntent = 'COMPATIBLE' | 'DEFAULT';
10 changes: 5 additions & 5 deletions packages/core-bridge/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::helpers::{
BridgeError, BridgeResult, JsonString, MutableFinalize, OpaqueInboundHandle,
OpaqueOutboundHandle,
};
use crate::runtime::*;
use crate::runtime::Runtime;

pub fn init(cx: &mut neon::prelude::ModuleContext) -> neon::prelude::NeonResult<()> {
cx.export_function("newMetricCounter", new_metric_counter)?;
Expand Down Expand Up @@ -91,10 +91,10 @@ pub enum MetricValue {
impl From<MetricValue> for CoreMetricValue {
fn from(value: MetricValue) -> Self {
match value {
MetricValue::Int(i) => CoreMetricValue::Int(i),
MetricValue::Float(f) => CoreMetricValue::Float(f),
MetricValue::Bool(b) => CoreMetricValue::Bool(b),
MetricValue::String(s) => CoreMetricValue::String(s),
MetricValue::Int(i) => Self::Int(i),
MetricValue::Float(f) => Self::Float(f),
MetricValue::Bool(b) => Self::Bool(b),
MetricValue::String(s) => Self::String(s),
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/workflow/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ export interface ContinueAsNewOptions {
*
* @default 'COMPATIBLE'
*
* @deprecated In favor of the new Worker Deployment API.
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
versioningIntent?: VersioningIntent;
Expand Down Expand Up @@ -492,6 +493,7 @@ export interface ChildWorkflowOptions extends Omit<CommonWorkflowOptions, 'workf
*
* @default 'COMPATIBLE'
*
* @deprecated In favor of the new Worker Deployment API.
* @experimental The Worker Versioning API is still being designed. Major changes are expected.
*/
versioningIntent?: VersioningIntent;
Expand Down
4 changes: 2 additions & 2 deletions packages/workflow/src/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ function startChildWorkflowExecutionNextHandler({
? encodeUnifiedSearchAttributes(options.searchAttributes, options.typedSearchAttributes) // eslint-disable-line deprecation/deprecation
: undefined,
memo: options.memo && mapToPayloads(activator.payloadConverter, options.memo),
versioningIntent: versioningIntentToProto(options.versioningIntent),
versioningIntent: versioningIntentToProto(options.versioningIntent), // eslint-disable-line deprecation/deprecation
priority: options.priority ? compilePriority(options.priority) : undefined,
},
});
Expand Down Expand Up @@ -941,7 +941,7 @@ export function makeContinueAsNewFunc<F extends Workflow>(
: undefined,
workflowRunTimeout: msOptionalToTs(options.workflowRunTimeout),
workflowTaskTimeout: msOptionalToTs(options.workflowTaskTimeout),
versioningIntent: versioningIntentToProto(options.versioningIntent),
versioningIntent: versioningIntentToProto(options.versioningIntent), // eslint-disable-line deprecation/deprecation
});
});
return fn({
Expand Down
Loading