The root cause is that taskresult has not been reconceiled. So move taskresult reconcile earlier to avoid workflow stuck.
time="2024-11-03T17:44:15.553Z" level=info msg="Processing workflow" Phase=Running ResourceVersion=1753330 namespace=argo workflow=workflow-template-hello-world-gfbjh
time="2024-11-03T17:44:15.554Z" level=debug msg="Task results completion status: map[workflow-template-hello-world-gfbjh-2798872602:false]" namespace=argo workflow=workflow-template-hello-world-gfbjh
time="2024-11-03T17:44:15.554Z" level=debug msg="taskresults of workflow are incomplete or still have daemon nodes, so can't mark workflow completed" fromPhase=Running namespace=argo toPhase=Error workflow=workflow-template-hello-world-gfbjh
time="2024-11-03T17:44:15.554Z" level=error msg="Unable to set ExecWorkflow" error="WorkflowSpec may not change during execution when the controller is set `templateReferencing: Secure`" namespace=argo workflow=workflow-template-hello-world-gfbjh
Verification
The scenario in the issue is verified and the workflow is set to error.
Fixes #13850
Motivation
Modifications
The root cause is that taskresult has not been reconceiled. So move taskresult reconcile earlier to avoid workflow stuck.
Verification
The scenario in the issue is verified and the workflow is set to error.