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

Orquesta with-items bug #4523

Closed
trstruth opened this issue Jan 28, 2019 · 3 comments · Fixed by #4573
Closed

Orquesta with-items bug #4523

trstruth opened this issue Jan 28, 2019 · 3 comments · Fixed by #4573

Comments

@trstruth
Copy link
Member

SUMMARY

In an orquesta workflow, when a task defines a with key, if some tasks in the iteration fail, the behavior from when: <% failed() %> is bugged. More specifically, occasionally the next task will not be executed, and the workflow will be stuck in a running state.

ISSUE TYPE
  • Bug Report
STACKSTORM VERSION
root@5ce0d9e5c022:/# st2 --version
st2 2.10.1, on Python 2.7.6
OS / ENVIRONMENT / INSTALL METHOD

docker, installed by following instructions at https://github.com/StackStorm/st2-docker

STEPS TO REPRODUCE

I have created a pack with a workflow that demonstrates this here. The workflow takes an array of numbers as input, and uses with items to pass each number to a python action that will succeed if the number is even, fail if the number is odd.

  • st2 pack install https://github.com/trstruth/wib
  • st2 run -a wib.wib numbers=1,2,3,4 (execute this about 20 times, as results are inconsistent)
EXPECTED RESULTS

All workflows should succeed fairly quickly, and their output should be as such:
image

ACTUAL RESULTS

Here is a screenshot of st2 execution list: The first 10 executions are with numbers=1,2,3,4 the last 10 are numbers=1,2,3
image

Some workflows get stuck in a running state, despite all of the with-items tasks completing:
image

@Kami
Copy link
Member

Kami commented Jan 29, 2019

Thanks for reporting this and taking the time to also create a sample workflow which reproduces the issue 👍

We will have a look as soon as we get a chance.

@m4dcoder m4dcoder assigned bigmstone and unassigned m4dcoder Jan 29, 2019
@m4dcoder
Copy link
Contributor

We were able to reproduce this with a much simpler workflow. This bug maybe related to how we handle conflict management when writing item result to the database. We currently have a separate issue opened at StackStorm/orquesta#125 to refactor how we handle DB write conflicts. The fix to this other issue may also resolve this problem. Let us fix that other issue first and we will come back and verify this. Our plan is to address these issues before our GA for orquesta at st2 v3.0.

tasks:
  task1:
    with: <% range(0,10) %>
    action: core.local cmd="exit $((RANDOM %2))"```

@m4dcoder
Copy link
Contributor

m4dcoder commented Apr 2, 2019

The bug tagged above is unrelated to this issue.

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

Successfully merging a pull request may close this issue.

4 participants