Skip to content

[Bug] Calling a Workflow with Worker Versioning and PINNED behavior in versionOverrides fails in Temporal Server >=1.28.0 #1753

@jbrody-nexxa

Description

@jbrody-nexxa

What are you really trying to do?

Call a Workflow with Worker Versioning and PINNED behavior using the TypeScript SDK client

Describe the bug

Starting in Temporal Server version 1.28.0, the validation logic for versioning overrides in the API expects either of the following structures for pinned behavior:

{
  pinned: {
    version: 'pinned-version', // v0.32
    behavior: temporal.api.workflow.v1.VersioningOverride.PinnedOverrideBehavior.PINNED_OVERRIDE_BEHAVIOR_PINNED, // v0.32  
  },
}

or:

{
  behavior: temporal.api.enums.v1.VersioningBehavior.VERSIONING_BEHAVIOR_PINNED, // v0.31
  pinnedVersion: 'pinned-version', // v0.31
}

Since TS SDK version 1.12, the client is sending versioning overrides in the following format:

{
  pinned: {
      version: 'pinned-version', // v0.32
  },
  behavior: temporal.api.enums.v1.VersioningBehavior.VERSIONING_BEHAVIOR_PINNED, // v0.31
  pinnedVersion: 'pinned-version', // v0.31
}

This fails validation, as the server prefers validation of the v0.32 structure over the deprecated v0.31 structure. The error message from the server is: ServiceError: must specify pinned override behavior if override is pinned.

See server validation code in https://github.com/temporalio/temporal/blob/fcd84c4be64104ca8b9b670f50539a027e77aa78/common/worker_versioning/worker_versioning.go#L483

Minimal Reproduction

  1. Start a Workflow Worker with the following workerDeploymentOptions:
    { useWorkerVersioning: true, defaultVersioningBehavior: 'AUTO_UPGRADE', version: { deploymentName: deploymentName, buildId: buildId, }
  2. Call WorkflowClient.start() from the TypeScript SDK with the following versioningOverride:
    { pinnedTo: { deploymentName: deploymentName, buildId: buildId, }, }
  3. Workflow does not start, and client produces the error: ServiceError: must specify pinned override behavior if override is pinned.

Environment/Versions

  • OS and processor: Mac, Linux
  • Temporal Version: TS SDK version 1.12.1; works on server 1.27.1, fails on sever 1.28.0 and 1.29.0
  • Are you using Docker or Kubernetes or building Temporal from source? Using Kubernetes and brew on Mac

Additional context

See the discussion thread with Carly on the issue in the server repo: temporalio/temporal#8114

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions