Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Retire Action-Chain workflow engine #49

Open
nzlosh opened this issue Sep 3, 2020 · 2 comments
Open

Proposal: Retire Action-Chain workflow engine #49

nzlosh opened this issue Sep 3, 2020 · 2 comments

Comments

@nzlosh
Copy link

nzlosh commented Sep 3, 2020

With Mistral deprecation underway, I found myself questioning the value of keeping and maintaining the action-chain workflow engine when it only provides a subset of Orquesta functionality without any major advantages.

If we compare a simple workflow in Orquesta vs Action-Chain, we can see the complexity of writing in on or the other is near parity.

Action-Chain

Metadata

---
name: simple_actionchain
pack: test
description: Simple Action Chain workflow
runner_type: action-chain
entry_point: "workflows/simple_actionchain.yaml"
enabled: true
parameters:
  message:
    type: string
    default: "Hello World!"

Workflow

---
chain:
  - name: display_message
    ref: core.local
    parameters:
      cmd: "echo {{ message }}"
    on-success: celebrate
    on-failure: retire

  - name: celebrate
    ref: core.local
    parameters:
      cmd: "echo Time to celebrate."

  - name: retire
    ref: core.local
    parameters:
      cmd: "echo Time to retire."

Result

id: 5f51046d79d4aea9a17090a0
action.ref: test.simple_actionchain
parameters: None
status: succeeded (2s elapsed)
result_task: celebrate
result: 
  failed: false
  return_code: 0
  stderr: ''
  stdout: Time to celebrate.
  succeeded: true
start_timestamp: Thu, 03 Sep 2020 14:57:49 UTC
end_timestamp: Thu, 03 Sep 2020 14:57:51 UTC
+--------------------------+------------------------+-----------------+------------+-------------------------------+
| id                       | status                 | task            | action     | start_timestamp               |
+--------------------------+------------------------+-----------------+------------+-------------------------------+
| 5f51046db6b0404a4575781d | succeeded (0s elapsed) | display_message | core.local | Thu, 03 Sep 2020 14:57:49 UTC |
| 5f51046eb6b0404a4575781f | succeeded (0s elapsed) | celebrate       | core.local | Thu, 03 Sep 2020 14:57:50 UTC |
+--------------------------+------------------------+-----------------+------------+-------------------------------+

Orquesta

Metadata

---
name: simple_orquesta
pack: test
description: Simple Orquesta workflow
runner_type: orquesta
entry_point: "workflows/simple_orquesta.yaml"
enabled: true
parameters:
  message:
    type: string
    default: "Hello World!"

Workflow

version: 1.0

input:
  - message

tasks:
  display_message:
    action: core.local
    input:
      cmd: "echo <% ctx().message %>"
    next:
      - when: <% succeeded() %>
        do: celebrate
      - when: <% failed() %>
        do: retire

  celebrate:
    action: core.local
    input:
      cmd: "echo Time to celebrate."

  retire:
    action: core.local
    input:
      cmd: "echo Time to retire."

Result

id: 5f51047b79d4aea9a17090a3
action.ref: test.simple_orquesta
parameters: None
status: succeeded (2s elapsed)
start_timestamp: Thu, 03 Sep 2020 14:58:03 UTC
end_timestamp: Thu, 03 Sep 2020 14:58:05 UTC
result: 
  output: null
+--------------------------+------------------------+-----------------+------------+-------------------------------+
| id                       | status                 | task            | action     | start_timestamp               |
+--------------------------+------------------------+-----------------+------------+-------------------------------+
| 5f51047b4d06ed3c6511eee6 | succeeded (1s elapsed) | display_message | core.local | Thu, 03 Sep 2020 14:58:03 UTC |
| 5f51047c4d06ed3c6511eef6 | succeeded (0s elapsed) | celebrate       | core.local | Thu, 03 Sep 2020 14:58:04 UTC |
+--------------------------+------------------------+-----------------+------------+-------------------------------+

The output is slightly different, but the overall execution is the same. I haven't done any extensive benchmarking between action-chain verses orquesta performance but the example shows that they are on par for simple linear workflows.

I think converging workflows to orquesta would simplify the choice for end users and reduce the code base/maintenance for St2 developers, hence this proposal.

@m4dcoder
Copy link

m4dcoder commented Sep 3, 2020

The intent of Orquesta is to replace both Mistral and Action Chain. We decided to put Action Chain deprecation on hold because it's working for many users and very little known defects. We can revisit this for Action Chain if there's significant vote on the community as this may impact a larger number of packs and workflows in production than Mistral.

@arm4b
Copy link
Member

arm4b commented Sep 3, 2020

Thanks for opening this issue!

There were some internal chats before about the Orquesta vs Action Chain.
I remember the main arguments behind keeping the Action Chain were simplicity, painless work and near real-time performance/speed, especially for big workflows.

It's good to have this discussion in one place and revisit the decisions with time as we got new data and opinions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants