Skip to content

change the config propagation design of ts-config#766

Closed
feiyang3cat wants to merge 3 commits into
masterfrom
api-ts-patch-2
Closed

change the config propagation design of ts-config#766
feiyang3cat wants to merge 3 commits into
masterfrom
api-ts-patch-2

Conversation

@feiyang3cat
Copy link
Copy Markdown
Contributor

@feiyang3cat feiyang3cat commented Apr 17, 2026

What changed?
(1) Only allowed the flexibility of disable_propagation for child workflows
(2) Updated comments to clarify the behavior of bound in TimeSkippingConfig

Why?
mainly for simplicity:

  • Ensure the default policy reflects the most common use case → (2)
  • Eliminate unnecessary flexibility → (1)

For reviewers: check the inline comment for detailed explanation

@feiyang3cat feiyang3cat requested review from a team April 17, 2026 23:49
@feiyang3cat feiyang3cat changed the title change the default ts-bound propagation bebahvior change the default propagation behavior of ts-config Apr 17, 2026
// 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.
Copy link
Copy Markdown
Contributor Author

@feiyang3cat feiyang3cat Apr 20, 2026

Choose a reason for hiding this comment

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

Reset workflows & continue-as-new don't produce another workflow execution the way child workflows do. Instead, they either fix the current workflow (reset) or extend the current wf for technical reasons (continue-as-new).

Therefore:

(1) The only flexibility to disable propagation applies to child workflows. disable_propagation → rename to disable_child_propagation

(2) Reset workflow shouldn't be highlighted here — reset rewinds execution to a specific event, and what happens next depends entirely on the event history. (removed to make the comments concise)

(3) For continue-as-new, propagation cannot be flexibly configured. The new workflow execution is treated as an extension of the original — they share the same bound. This should be called out explicitly in the comments.

@feiyang3cat feiyang3cat changed the title change the default propagation behavior of ts-config change the config propagation design of ts-config Apr 20, 2026
// using the same values as the parent workflow.
// If set, child workflows will be started with time skipping disabled.
// Regardless of this field, the start time of the child workflow uses the parent's virtual time.
bool disable_child_workflow_propagation = 3;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lol interesting that 3 is not used before.

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.

yes, the 3 was somehow saved by fate

// 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.
// Bound scope:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably also clarify the behavior of bound on reset.
Will, for example, the skipped/elapsed duration get reset as well?

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.

For this part, I haven't found a clean way to document the full "propagation" behavior without being verbose or exposing too many internal details. As we agreed a sound design ties time skipping propagation closely to the type of workflow execution being triggered, and there are roughly three categories:

(1) Feature-wise propagation — config and virtual time are carried over to a new, distinct workflow execution:

  • Child workflows
  • Nexus (only if the Nexus operation maps to a workflow execution — so we drop this )

(2) Only implementation-wise propagation:

  • Reset: returns execution to a point in the current execution's event history. The resulting config and virtual time depend on the target event and the state of the execution at that time.
  • Continue-as-new: will be treated as one extended execution run, and all CANs share the config and inherit the virtual time from previous one;
  • Retry: won't inherit the virtual time, and only inherit the initial configuration at the time previous workflow started

(3) Grey area

  • Cron / Scheduler: best strategy TBD

So IMH, we postpone add an explanation of this whole strategy until all of them are soundly completed.

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.

alternatively, we may hold this pr until I finish the propagation part of the project

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMO there's kind of no reason in general to have any of these API changes in master until we actually have the MVP working.

That said, we already do, and it's just updating a comment, so not a big deal either way.

But to my point in my other comment about not needing reserved - this is kinda why it's easier to just keep API stuff unmerged until we're happy with the implementation.

Comment on lines +597 to +598
reserved 2;
reserved "disable_propagation";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you actually need to bother with reserving 2? We never shipped any of this so it should be fine to break

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.

Get it.

I will hold this PR until the propagation feature set is completed and ready to merge into server main.
And future updates to API will hold for a while until related features are ready and stable.

We took an approach of merging feature-set by feature-set of this project into main to avoid maintaining a long lasting pr and merging a super huge pr into the server.

Copy link
Copy Markdown
Contributor Author

@feiyang3cat feiyang3cat Apr 21, 2026

Choose a reason for hiding this comment

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

But it seems we cannot pass the lint check without reserving it.

// 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.
// Bound scope:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMO there's kind of no reason in general to have any of these API changes in master until we actually have the MVP working.

That said, we already do, and it's just updating a comment, so not a big deal either way.

But to my point in my other comment about not needing reserved - this is kinda why it's easier to just keep API stuff unmerged until we're happy with the implementation.

@feiyang3cat
Copy link
Copy Markdown
Contributor Author

close this pr, and merge until the propagation feature set is completed

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