Skip to content

fix(client): propagate priority on signalWithStart - #2968

Closed
MattSilvaa wants to merge 1 commit into
temporalio:mainfrom
MattSilvaa:mattsilvaa/fix-signalwithstart-priority
Closed

fix(client): propagate priority on signalWithStart#2968
MattSilvaa wants to merge 1 commit into
temporalio:mainfrom
MattSilvaa:mattsilvaa/fix-signalwithstart-priority

Conversation

@MattSilvaa

Copy link
Copy Markdown

Closes #2967

What changed

WorkflowClientRequestFactory.newSignalWithStartWorkflowExecutionRequest now copies the priority field off the built start request, alongside the other startParameters.has*() blocks (retryPolicy, memo, searchAttributes, header, startDelay, userMetadata, versioningOverride):

if (startParameters.hasPriority()) {
  request.setPriority(startParameters.getPriority());
}

Why

signalWithStart silently dropped the Priority set on WorkflowOptions (priorityKey, fairnessKey, fairnessWeight), while a plain start propagated it. The same options produced different server-side behavior depending on the entry point. Fairness lives inside the same Priority proto, so it was lost for the same reason. This restores parity with the start path and honors the "keep the two builders in sync" comment already in the class.

Copying the whole Priority proto (rather than individual fields) carries all three fields through, and reusing the value already on startParameters avoids re-converting from WorkflowOptions.

Testing

  • Added RootWorkflowClientInvokerPriorityPropagationTest: drives a real RootWorkflowClientInvoker.signalWithStart against a mocked GenericWorkflowClient, captures the sent SignalWithStartWorkflowExecutionRequest, and asserts the request priority equals ProtoConverters.toProto(options.getPriority()) including all three fields.
  • Existing PriorityInfoTest and the sibling RootWorkflowClientInvokerLinkPropagationTest still pass.

Risk

Low. Single-field production change that adds a field already intended to propagate, matching the existing start behavior. No public API change.

WorkflowClientRequestFactory.newSignalWithStartWorkflowExecutionRequest
copied retryPolicy, memo, searchAttributes, header, startDelay,
userMetadata, and versioningOverride off the built start request but
never copied priority. As a result, the Priority set on WorkflowOptions
(priorityKey, fairnessKey, fairnessWeight) was silently dropped on
signalWithStart while a plain start propagated it correctly.

Copy the whole Priority proto so all three fields carry through, matching
the plain start path and the class's "keep the two builders in sync"
comment.
@MattSilvaa
MattSilvaa requested a review from a team as a code owner July 24, 2026 18:05
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

signalWithStart drops Priority (priority/fairness) set on WorkflowOptions

2 participants