argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
14.99k stars 3.19k forks source link

Unique phases for suspended and stopped #8182

Open Colstuwjx opened 2 years ago

Colstuwjx commented 2 years ago

Summary

What change needs making?

For the workflow phase and node phase, we didn't implement a full workflow logic, e.g.

  1. if we resume or stop a completed workflow, it should panic since workflow state machine wouldn't allow transform state from ``, see issue #8173
  2. if we suspend a workflow, it will set suspend=true in the workflow status, but the phase is still be Running, I think it doesn't make sense, how about design a set of workflow primitives and use a single field to show the workflow state?

Use Cases

When would you use this?

When we're planning to design a workflow system based on argo-workflow, we need to read the workflow state and take actions to run the workflow, therefore, we need to improve our workflow design. For now, it's too fragmented and not friendly to user.


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

alexec commented 2 years ago

Is this a duplicate?

Colstuwjx commented 2 years ago

I don't think it's duplicated to #8173 , instead, I want to confirm if we plan to merge these workflow state into a single phase or not.

From a point view of user, I can't understand that I need to check both the workflow phase and the suspend flag to confirm whether the workflow is running or not. If I suspended a workflow, it should turn to SUSPENDING or PAUSING, rather than RUNNING with another flag suspend: true.