Skip to content

Reset to LastWorkflowTaskCompleted doesn't work for workflows without a single completed workflow task #494

@mfateev

Description

@mfateev

Expected Behavior

Reset should work for all workflows. If a workflow timed out without any workflow task started event, it should just reset to its startWorkflowExecutionEvent.

Actual Behavior

From Slack

Hi team! I'm trying to replay history of some of workflows. Some of them have events WorkflowExecutionStarted -> DecisionTaskScheduled -> WorkflowExecutionTimedOut

/usr/local/bin # ./cadence --ad cadence-frontend:7933 --do dikbm_integration_domain workflow reset -w 5f4baa91-8987-422b-97a4-1fed23d71204 -r f9f31434-4bbf-4094-a802-a0e706de7bf6 --reset_type LastDecision
Completed --reason "restart timeout workflow"
resetType: LastDecisionCompleted
Get DecisionFinishID failed
Error: getResetEventIDByType failed
Error Details: no DecisionFinishID
('export CADENCE_CLI_SHOW_STACKS=1' to see stack traces)

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIIssues/features involving the APIdifficulty: easyenhancementNew feature or requestgood first issueGood for newcomersup-for-grabsIssues to consider for external contribution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions