Comments (4)
I have reproduced the same problem on a single node 3.3.0 version of StackStorm running on CentOS 8 which is configured with redis.
If I use a workflow such as:
version: 1.0
tasks:
# [536, 116]
task1:
action: core.echo
next:
- do:
- task2
- do:
- task3
input:
message: start
# [391, 251]
task2:
action: core.local
next:
- do:
- task4
input:
cmd: ls
# [765, 275]
task3:
action: core.local
next:
- do:
- task4
when: <% failed() %>
input:
cmd: ls /rubbish
# [550, 436]
task4:
action: core.echo
join: all
input:
message: joined
then it can fail on the join with the same error about partially satisified. Sometimes it passes, sometimes it fails.
However if I alter the workflow to add in a dummy task before the join then it works (which is the same workaround performed in #190), e.g. by adding a task5 after the task that fails but on that same branch, then the join works.
version: 1.0
tasks:
# [536, 116]
task1:
action: core.echo
next:
- do:
- task2
- do:
- task3
input:
message: start
# [391, 251]
task2:
action: core.local
next:
- do:
- task4
input:
cmd: ls
# [765, 275]
task3:
action: core.local
next:
- do:
- task5
when: <% failed() %>
input:
cmd: ls /rubbish
# [550, 436]
task4:
action: core.echo
join: all
input:
message: joined
# [773, 371]
task5:
action: core.echo
next:
- do:
- task4
input:
message: hello
from orquesta.
I was not able to implement the workaround successful. I changed my workflow like following, to implement an intermediate task called "Workaround"
description: Test for GIT BUG
input:
- ip: "127.0.0.1"
- mac_address: "0"
- dns_hostname: "test.testad.net"
vars:
- mac_vendor: "DEFAULT-VALUE"
- a_some_info: "unkown"
- reverse_lookup_result: null
- forward_lookup_result: null
tasks:
Reverse_lookup:
action: core.local
input:
cmd: "nslookup <% ctx().ip %>"
next:
- when: <% completed() %>
publish:
- reverse_lookup_result: <% result().stdout %>
do:
- Add_host_info_note
Forward_lookup:
action: core.local
input:
cmd: "dig <% ctx().dns_hostname %>"
next:
- when: <% completed() %>
publish:
- forward_lookup_result: <% result().stdout %>
do:
- Add_host_info_note
MAC_vendor_lookup:
action: core.http
input:
url: "https://api.macvendors.com/<% ctx().mac_address %>"
method: "GET"
next:
- when: <% succeeded() %>
publish:
- mac_vendor: <% result().body %>
do:
- Workaround
- when: <% failed() %>
publish:
- mac_vendor: "-"
do:
- Workaround
Do_something_else:
action: core.echo message="Test"
next:
- when: <% completed() %>
publish:
- a_some_info: <% result().stdout %>
do:
- Add_more_info
Workaround:
action: core.noop
next:
- when: <% succeeded() %>
do:
- Add_host_info_note
Add_host_info_note:
join: all
action: core.echo message="<% ctx().reverse_lookup_result %> <% ctx().forward_lookup_result %> <% ctx().mac_vendor %>
Add_more_info:
action: core.echo message=<% ctx().a_some_info %>
If I execute it, I get the following error:
{
"spec_path": "tasks.Add_host_info_note",
"message": "The join task \"Add_host_info_note\" is unreachable. A join task is determined to be unreachable if there are nested forks from multi-referenced tasks that join on the said task. This is ambiguous to the workflow engine because it does not know at which level should the join occurs.",
"type": "semantic",
"schema_path": "properties.tasks.patternProperties.^\\w+$"
}
Looks like the difference in regards to your workflow is that the "do" section in your wfl is not part of the when block.
If I change my wfl like this:
MAC_vendor_lookup:
action: core.http
input:
url: "https://api.macvendors.com/<% ctx().mac_address %>"
method: "GET"
next:
- do:
- Workaround
- when: <% succeeded() %>
publish:
- mac_vendor: <% result().body %>
- when: <% failed() %>
publish:
- mac_vendor: "-"
The workflow is now executed successful from a flow perspective but the value published in this task for mac_vendor is not visible/usable in the final step "Add_host_info_note". It has always the value given in "vars" section.
I can not confirm any successful workaround so far.
from orquesta.
With my simplified way but with the publish I got the conditional publishing working with some Jinja (you might be able to do it in YAQL). But I simplified it down to getting the equivaletn of your MAC_vendor_lookup have one transition to workaround but the conditional being in the publish value.
e..g I had:
next:
- do:
- task5
when: <% completed() %>
publish:
- mac_vendor: "{% if succeeded() %} {{ result().stdout }} {% else %} - {% endif %} "
So you might be able to use something like:
MAC_vendor_lookup:
action: core.http
input:
url: "https://api.macvendors.com/<% ctx().mac_address %>"
method: "GET"
next:
- do:
- Workaround
when: <% completed() %>
publish:
- mac_vendor: "{% if succeeded() %} {{ result().body }} {% else %} - {% endif %} "
from orquesta.
I am able to reproduce the issue. Thanks for reporting this. StackStorm v3.4 is getting set to be released. Should expect fix in v3.5.
from orquesta.
Related Issues (20)
- Exception running workflow - 'ValueError: malformed node or string: <_ast.BinOp object at 0x7f80d29946d8>' HOT 3
- Workflow join is not triggered on complete for failed task(s) HOT 8
- The ujson 2.0.x doesn't compatible with Orquesta HOT 1
- Retries using with-items runs a retry even on objects that succeeded as well HOT 5
- Add ability in task spec to wait for a lock before proceeding HOT 4
- Join failure within nested workflows can cause Parent workflow to run indefinitely.
- Join ALL and conditional branches conflict? HOT 6
- Incomplete next staged concurrent task with items if last running nested item fails.
- KeyValue DataStore does not load in Workflow HOT 2
- 'Inspect the workflow spec' and 'Instantiate the workflow conductor' take too long HOT 7
- Disable action notify triggers when action is executed under workflow context HOT 3
- Naming a workflow task "get_task" causes "'TaskSpec' object is not callable" error
- Valid YAQL in With Items Input Fails HOT 8
- JOIN all with condition HOT 2
- Investigate using `rustworkx` instead of `networkx` HOT 1
- Workflow stuck with concurrency value of 0.
- Orquesta workflow inquiries responder user ID not found
- task with join: all starts without waiting for all the previous task completed when there is a loop
- Vague error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orquesta.