Skip to content

Avoid refreshing workflow start tasks on later transitions - #11853

Merged
xwduan merged 3 commits into
mainfrom
fix/passive-workflow-run-timeout-task
Sep 2, 2026
Merged

Avoid refreshing workflow start tasks on later transitions#11853
xwduan merged 3 commits into
mainfrom
fix/passive-workflow-run-timeout-task

Conversation

@xwduan

@xwduan xwduan commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What changed?

Workflow start task refresh now uses the workflow start versioned transition instead of the latest execution-state transition. This limits workflow start task regeneration to replication ranges that include the initial workflow transition.

Why?

Later execution-state changes can advance LastUpdateVersionedTransition while the workflow remains running. Partial task refresh then incorrectly treats the workflow as newly started and creates another WorkflowRunTimeoutTask.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Ran the focused TaskRefresher unit test and the single-cluster passive replication workflow and parallel-activity scenarios with exact active/passive task comparison enabled.

Potential risks

This relies on workflow start being transition count 1, matching transition-history initialization. Full refresh still includes the initial transition and continues regenerating required workflow start tasks.

@xwduan
xwduan marked this pull request as ready for review September 2, 2026 00:01
@xwduan
xwduan requested a review from a team September 2, 2026 00:01
@xwduan
xwduan requested review from a team as code owners September 2, 2026 00:01
@xwduan xwduan self-assigned this Sep 2, 2026
@xwduan xwduan added reliability-2026 Reliability related changes team/cgs-foundation Require cgs foundation team review labels Sep 2, 2026
@xwduan
xwduan merged commit 899f401 into main Sep 2, 2026
61 checks passed
@xwduan
xwduan deleted the fix/passive-workflow-run-timeout-task branch September 2, 2026 16:28
thestephenstanton pushed a commit that referenced this pull request Sep 2, 2026
## What changed?
Workflow start task refresh now uses the workflow start versioned
transition instead of the latest execution-state transition. This limits
workflow start task regeneration to replication ranges that include the
initial workflow transition.

## Why?
Later execution-state changes can advance LastUpdateVersionedTransition
while the workflow remains running. Partial task refresh then
incorrectly treats the workflow as newly started and creates another
WorkflowRunTimeoutTask.

## How did you test it?
- [ ] built
- [x] run locally and tested manually
- [ ] covered by existing tests
- [x] added new unit test(s)
- [x] added new functional test(s)

Ran the focused TaskRefresher unit test and the single-cluster passive
replication workflow and parallel-activity scenarios with exact
active/passive task comparison enabled.

## Potential risks
This relies on workflow start being transition count 1, matching
transition-history initialization. Full refresh still includes the
initial transition and continues regenerating required workflow start
tasks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reliability-2026 Reliability related changes team/cgs-foundation Require cgs foundation team review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants