workflow icon indicating copy to clipboard operation
workflow copied to clipboard

[bug] restart a running workflow will cause workflow excutor always return Skipped

Open MengJiapeng opened this issue 1 year ago • 2 comments

Describe the bug

restart a running workflow will cause workflow excutor always return Skipped

To Reproduce

  1. start a workflowrun
  2. use vela-cli to restart the workflowrun vela workflow restart xxx --step xxx
  3. workflow will not handled by controller, and the log like this "Skip this reconcile" workflowrun="default/test-xxx" spanID="i-dv1uiiok"

Expected behavior

Screenshots

Workflow Version v0.6.0

Cluster information

Additional context

MengJiapeng avatar Aug 14 '24 05:08 MengJiapeng

The reason caused the issue is that vela-cli will clean the step status when restart workflow, while workflow controller cached the step status count in memory and compare the count before reconcile, if the count is smaller than last cached count, it will skip reconcile. I'm confused about the step status count cache, is it still necessary? here is the related code in workflow controller https://github.com/kubevela/workflow/blob/9d557371b38431ef0d3e5abfcfc5bd7c1235cfc3/pkg/executor/workflow.go#L130

MengJiapeng avatar Aug 14 '24 05:08 MengJiapeng

This cache was originally used to handle the cache update problem caused by controller reconcile, it's an occasional problem so I'm no sure if we should disable it.

FogDong avatar Aug 14 '24 14:08 FogDong