Skip to content

api changes for time-skipping propagation#770

Open
feiyang3cat wants to merge 5 commits intomasterfrom
api-ts-patch-2
Open

api changes for time-skipping propagation#770
feiyang3cat wants to merge 5 commits intomasterfrom
api-ts-patch-2

Conversation

@feiyang3cat
Copy link
Copy Markdown
Contributor

@feiyang3cat feiyang3cat commented Apr 22, 2026

What changed and why?

Propagation refers to how time-skipping config is carried over to all workflows started by the current workflow: retry, continue-as-new, child workflows, reset, etc.

  1. Remove disable_propagation and max_target_time, because neither of them can be soundly defined when time-skipping propagates transitively across related workflows. One of the many examples:
  • max_target_time: as an absolute time point, it may already have passed by the time a retry or downstream workflow starts, making it ambiguous whether to disable or preserve time-skipping — neither is a clearly correct default
  • disable_propagation: it is unclear which type of transitively triggered workflow this should apply to, and treating all cases uniformly is unreasonable; we defer exposing this flexibility until user demand and use cases are better understood
  1. Add comments of the propagation behavior for each feature (retry, continue-as-new, child workflow, reset, cron)
  2. Add comments to the bound field
  3. Add propagatedSkippedDuration to time skipping config so that new workflows can inherit the virtual time

@feiyang3cat feiyang3cat requested review from a team April 22, 2026 21:23
@@ -590,28 +590,28 @@ message WorkflowExecutionOptions {
// User timers are not classified as in-flight work and will be skipped over.
// When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.
message TimeSkippingConfig {
Copy link
Copy Markdown
Contributor Author

@feiyang3cat feiyang3cat Apr 22, 2026

Choose a reason for hiding this comment

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

these reserved ones can be removed
but buf-breaking step in Makefile:115-117 stops this kind of changes

@feiyang3cat feiyang3cat force-pushed the api-ts-patch-2 branch 2 times, most recently from d5b3984 to b9d4b1b Compare April 23, 2026 06:25
and add propagated_skipped_duration to propagate virtual time
@feiyang3cat feiyang3cat changed the title [don't merge] api changes for time-skipping propagation api changes for time-skipping propagation Apr 23, 2026
// and possibly other features added in the future.
// User timers are not classified as in-flight work and will be skipped over.
// When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.
//
Copy link
Copy Markdown
Contributor Author

@feiyang3cat feiyang3cat Apr 23, 2026

Choose a reason for hiding this comment

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

cc @yycptt added here but yet still this cannot replace the power of an educational document with examples in our web

Comment thread temporal/api/workflow/v1/message.proto Outdated

// If this execution was started by a previous execution that had already skipped some time,
// it inherits the accumulated skipped duration from that execution through this field.
// This field is set internally by the server and cannot be configured by the user.
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.

Should this even be here then? Maybe it should be a separate field on StartWorkflowExecutionRequest and WorkflowExecutionStartedEventAttributes. Then you can also avoid all those packing/unpacking/cloning changes.

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.

oh, yes. I think this makes sense. Let me change it.

@feiyang3cat feiyang3cat force-pushed the api-ts-patch-2 branch 2 times, most recently from 1b2fb47 to 8866718 Compare April 23, 2026 23:56
// The propagated time-skipping configuration for the child workflow.
temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 21;

// Propagate the duration skipped to the child workflow.
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.

need snapshot for child workflow as the parent may still be running
but not needed for CaN as the CaN Event is the closing event of the previous wf

// If a workflow execution is started by a previous execution (parent-child workflow or continue-as-new)
// that has already skipped some time, the accumulated skipped duration from that execution
// can be passed to the new workflow execution through this field.
google.protobuf.Duration initial_skipped_duration = 30;
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.

Do we need this in this request proto? We have internal proto definition for the history service's StartWorkflowExecutionRequest. If SDK's doesn't have to provide this value, we can move this to that proto. For the use cases of StartChildWorkflow and Continue-As-New, we only call this API on history service without going through frontend.

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.

I see. this makes sense

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.

udpated

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