[bug] restart a running workflow will cause workflow excutor always return Skipped
Describe the bug
restart a running workflow will cause workflow excutor always return Skipped
To Reproduce
- start a workflowrun
- use vela-cli to restart the workflowrun
vela workflow restart xxx --step xxx - 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
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
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.