Skip to content

Add start_delay to ActivityOptions for update support#804

Merged
fretz12 merged 3 commits into
mainfrom
fredtzeng/saa-update-opts-start-delay
Jul 1, 2026
Merged

Add start_delay to ActivityOptions for update support#804
fretz12 merged 3 commits into
mainfrom
fredtzeng/saa-update-opts-start-delay

Conversation

@fretz12

@fretz12 fretz12 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

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.

@fretz12 fretz12 requested review from a team June 15, 2026 21:05
@fretz12 fretz12 force-pushed the fredtzeng/saa-update-opts-start-delay branch from c10295c to 95d0524 Compare June 16, 2026 18:49
// 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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Applied comment where applicable.

Comment thread temporal/api/activity/v1/message.proto Outdated
@fretz12 fretz12 force-pushed the fredtzeng/saa-update-opts-start-delay branch from 95d0524 to 81a31ea Compare June 30, 2026 21:43
@fretz12 fretz12 requested a review from dandavison June 30, 2026 21:46
@fretz12 fretz12 merged commit 2f45bcd into main Jul 1, 2026
4 of 5 checks passed
@fretz12 fretz12 deleted the fredtzeng/saa-update-opts-start-delay branch July 1, 2026 20:43
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.

3 participants