-
Notifications
You must be signed in to change notification settings - Fork 1.2k
AutoUpgrade-on-Continue-as-New option (Trampolining) #8784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…or PINNED_UNTIL_CONTINUE_AS_NEW
| request.WorkerVersionStamp, | ||
| workflowTask.BuildIdRedirectCounter, | ||
| nil, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Continue-as-new reasons lost for transient/speculative workflow tasks
When transient or speculative workflow tasks are converted to normal tasks, nil is passed for suggestContinueAsNewReasons because the WorkflowTaskInfo struct only stores the SuggestContinueAsNew boolean, not the reasons array. The new TARGET_WORKER_DEPLOYMENT_VERSION_CHANGED reason is calculated in AddWorkflowTaskStartedEvent but never stored, so it's lost when the event is created during conversion. This results in events with SuggestContinueAsNew=true but an empty SuggestContinueAsNewReasons slice, preventing SDKs from knowing why continue-as-new was suggested.
What changed?
Give the option to upgrade-on-Continue-as-New with a continue-as-new option
Why?
To unlock "Trampolining"
How did you test it?
Note
Introduces AutoUpgrade-on-Continue-as-New, adds
target_deployment_versiontoRecordWorkflowTaskStartedRequest, propagates it through matching/history, and records explicit continue-as-new suggestion reasons.suggest_continue_as_newreasons, including target worker deployment version change.target_deployment_versiontohistoryservice.v1.RecordWorkflowTaskStartedRequest(request_response.proto), regenerate Go stubs.WorkflowTaskStartedevent attributes to includesuggest_continue_as_new_reasons.AddWorkflowTaskStartedEvent(...)signatures to accept target deployment version and pass along suggest-continue-as-new reasons.RecordWorkflowTaskStartedcalls.go.temporal.io/apimodule version ingo.mod/go.sum.Written by Cursor Bugbot for commit 9aff4da. This will update automatically on new commits. Configure here.