fix(client): propagate priority on signalWithStart - #2968
Closed
MattSilvaa wants to merge 1 commit into
Closed
Conversation
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.
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2967
What changed
WorkflowClientRequestFactory.newSignalWithStartWorkflowExecutionRequestnow copies thepriorityfield off the built start request, alongside the otherstartParameters.has*()blocks (retryPolicy, memo, searchAttributes, header, startDelay, userMetadata, versioningOverride):Why
signalWithStartsilently dropped thePriorityset onWorkflowOptions(priorityKey,fairnessKey,fairnessWeight), while a plainstartpropagated it. The same options produced different server-side behavior depending on the entry point. Fairness lives inside the samePriorityproto, 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
Priorityproto (rather than individual fields) carries all three fields through, and reusing the value already onstartParametersavoids re-converting fromWorkflowOptions.Testing
RootWorkflowClientInvokerPriorityPropagationTest: drives a realRootWorkflowClientInvoker.signalWithStartagainst a mockedGenericWorkflowClient, captures the sentSignalWithStartWorkflowExecutionRequest, and asserts the request priority equalsProtoConverters.toProto(options.getPriority())including all three fields.PriorityInfoTestand the siblingRootWorkflowClientInvokerLinkPropagationTeststill pass.Risk
Low. Single-field production change that adds a field already intended to propagate, matching the existing start behavior. No public API change.