Add start_delay to ActivityOptions for update support#804
Open
fretz12 wants to merge 1 commit into
Open
Conversation
c10295c to
95d0524
Compare
dandavison
reviewed
Jun 30, 2026
| // Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. | ||
| // When updated, anchored to the original `schedule_time`. If the resulting time is in the past, dispatches | ||
| // immediately. | ||
| google.protobuf.Duration start_delay = 8; |
Contributor
There was a problem hiding this comment.
How about we word this as
Time to wait before making the first activity task available for dispatch
Internally, there are two dispatch times: (1) the time that History dispatches a task to Matching and (2) the time that Matching dispatches a task to a user worker. Only (2) is directly relevant to users, and (1) != (2) because of the possibility of non-sync match (as well as workers being offline).
If you agree with this suggestion, it should also be applied to the StartWorkflow, SignalWithStartWorkflow, StartActivity doc comments.
dandavison
reviewed
Jun 30, 2026
| temporal.api.common.v1.Priority priority = 7; | ||
|
|
||
| // Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. | ||
| // When updated, anchored to the original `schedule_time`. If the resulting time is in the past, dispatches |
Contributor
There was a problem hiding this comment.
Suggested change
| // When updated, anchored to the original `schedule_time`. If the resulting time is in the past, dispatches | |
| // When updated, the time is added to the original `schedule_time`, not to the current time. If the resulting time is in the past, dispatches |
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.
What changed?
Added a start_delay field to the ActivityOptions message in temporal/api/activity/v1/message.proto. OpenAPI specs (v2/v3) were regenerated accordingly.
Why?
Expose start_delay through UpdateActivityExecutionOptions so users can modify or zero out the delay on a still-pending standalone activity. The new value is anchored to the activity's original schedule_time, so the field has the same semantics whether set at creation or via update. Server-side implementation lands in a follow-up PR.