-
Notifications
You must be signed in to change notification settings - Fork 92
api changes for time-skipping propagation #770
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
Open
feiyang3cat
wants to merge
3
commits into
master
Choose a base branch
from
api-ts-patch-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+53
−50
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -580,8 +580,8 @@ message WorkflowExecutionOptions { | |
| temporal.api.common.v1.Priority priority = 2; | ||
|
|
||
| // Time-skipping configuration for this workflow execution. | ||
| // If not set, the time-skipping conf will not get updated upon request, | ||
| // i.e. the existing time-skipping conf will be preserved. | ||
| // If not set, the time-skipping configuration is not updated by this request; | ||
| // the existing configuration is preserved. | ||
| TimeSkippingConfig time_skipping_config = 3; | ||
| } | ||
|
|
||
|
|
@@ -591,43 +591,45 @@ message WorkflowExecutionOptions { | |
| // 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. | ||
| // | ||
| // Propagation behavior of time skipping: | ||
| // The enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows: | ||
| // (1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are | ||
| // inherited from the current execution. The configured bound is shared between the inherited skipped | ||
| // duration and any additional duration skipped by the new run. | ||
| // (2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the | ||
| // current workflow started; the accumulated skipped duration of the current run is not propagated. | ||
| // (3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays | ||
| // all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that | ||
| // point, the resulting run ends up with the same final time-skipping configuration as the previous run. | ||
| message TimeSkippingConfig { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these reserved ones can be removed |
||
| reserved 2, 6; | ||
| reserved "disable_propagation", "max_target_time"; | ||
|
|
||
| // Enables or disables time skipping for this workflow execution. | ||
| // By default, this field is propagated to transitively related workflows (child workflows/start-as-new/reset) | ||
| // at the time they are started. | ||
| // Changes made after a transitively related workflow has started are not propagated. | ||
| bool enabled = 1; | ||
|
|
||
| // If set, the enabled field is not propagated to transitively related workflows. | ||
| bool disable_propagation = 2; | ||
|
|
||
| // Optional bound that limits how long time skipping remains active. | ||
| // Once the bound is reached, time skipping is automatically disabled. | ||
| // It can later be re-enabled via UpdateWorkflowExecutionOptions. | ||
| // | ||
| // This is particularly useful in testing scenarios where workflows | ||
| // are expected to receive signals, updates, or other events while | ||
| // timers are in progress. | ||
| // Optional bound that limits the gap between the virtual time of this execution and wall-clock time. | ||
| // Once the bound is reached, time skipping is automatically disabled, | ||
| // but can be re-enabled by setting `enabled` to true via UpdateWorkflowExecutionOptions. | ||
| // This bound cannot be set to a value smaller than the execution's currently skipped duration. | ||
| // | ||
| // This bound is not propagated to transitively related workflows. | ||
| // When bound is also needed for transitively related workflows, | ||
| // it is recommended to set disable_propagation to true | ||
| // and configure TimeSkippingConfig explicitly for transitively related workflows. | ||
| // This is useful in testing scenarios where a workflow is expected to receive | ||
| // signals, updates, or other external events while timers are in progress. | ||
| oneof bound { | ||
|
|
||
| // Maximum total virtual time that can be skipped. | ||
| google.protobuf.Duration max_skipped_duration = 4; | ||
|
|
||
| // Maximum elapsed time since time skipping was enabled. | ||
| // This includes both skipped time and real time elapsing. | ||
| // (-- api-linter: core::0142::time-field-names=disabled --) | ||
| google.protobuf.Duration max_elapsed_duration = 5; | ||
|
|
||
| // Absolute virtual timestamp at which time skipping is disabled. | ||
| // Time skipping will not advance beyond this point. | ||
| google.protobuf.Timestamp max_target_time = 6; | ||
| } | ||
|
|
||
| // 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. | ||
| google.protobuf.Duration initial_skipped_duration = 3; | ||
| } | ||
|
|
||
| // Used to override the versioning behavior (and pinned deployment version, if applicable) of a | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
cc @yycptt added here but yet still this cannot replace the power of an educational document with examples in our web