Add schedule_to_start_timeout to WorkflowTaskScheduledEvent #9257
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.
What changed?
schedule_to_start_timeoutonWorkflowTaskScheduledEventAttributeswhenever the server applies a schedule-to-start timeout (sticky task queue or speculative workflow task on normal queue).scheduleToStartTimeoutparameter toCreateWorkflowTaskScheduledEventAddWorkflowTaskScheduledEvent.WorkflowTaskScheduledevents now pass the timeout fromGetWorkflowTaskScheduleToStartTimeout()when applicable (sticky or speculative); otherwise passnil.GetTransientWorkflowTaskInfo: transient scheduled event attributes now includeScheduleToStartTimeoutwhen the task queue is sticky or the workflow task is speculative.nil) where the builder is called.Depends on temporalio/api adding the
schedule_to_start_timeoutfield toWorkflowTaskScheduledEventAttributes(e.g. API PR temporalio/api#710 ). This PR will not build until that API PR is merged; then runmake update-go-apiand push to refresh dependencies.Why?
Fixes #778. The server enforces a schedule-to-start timeout (e.g. 5s for speculative WT, or the sticky timeout) but the event did not record it, so UIs could show a different value and users saw timeouts earlier than expected. Recording the timeout on the event makes server behavior visible and consistent for clients and UIs.
How did you test it?
Potential risks
Low: new field is optional; existing history and clients are unchanged. Server logic (timer creation) was already correct; this only records the same value in the event.