Skip to content

Commit

Permalink
Merge pull request #4572 from StackStorm/fix-orquesta-join-ctx
Browse files Browse the repository at this point in the history
Minor bug fix to orquesta for overwritten context on task join
  • Loading branch information
m4dcoder authored Mar 5, 2019
2 parents 7b53886 + de28fb5 commit e7426a2
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 15 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Fixed
(improvement) StackStorm/orquesta#122.
* Fix orquesta workflow stuck in running status when one or more items failed execution for a
with items task. (bug fix) #4523
* Fix orquesta workflow bug where context variables are being overwritten on task join.
(bug fix) StackStorm/orquesta#112

2.10.2 - February 21, 2019
--------------------------
Expand Down
18 changes: 9 additions & 9 deletions contrib/examples/actions/workflows/orquesta-join.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@ version: 1.0
description: A basic workflow that demonstrate branching and join.

vars:
- messages: null

output:
- messages:
- <% ctx().msg1 %>
- <% ctx().msg2 %>
- <% ctx().msg3 %>
- <% ctx().msg4 %>
- msg1: foobar
- msg2: fubar

tasks:
task1:
Expand Down Expand Up @@ -73,8 +67,14 @@ tasks:
publish: msg4="I'll grind his bones to make my bread"
do: task10


# converge branches
task10:
join: all
action: core.noop

output:
- messages:
- <% ctx().msg1 %>
- <% ctx().msg2 %>
- <% ctx().msg3 %>
- <% ctx().msg4 %>
2 changes: 1 addition & 1 deletion contrib/runners/orquesta_runner/in-requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
git+https://github.com/StackStorm/orquesta.git@5151f38877ac7d05d0576c183900f780a7556539#egg=orquesta
git+https://github.com/StackStorm/orquesta.git@d038caf217cf63bca2364905160bab7655f81d99#egg=orquesta
2 changes: 1 addition & 1 deletion contrib/runners/orquesta_runner/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Don't edit this file. It's generated automatically!
git+https://github.com/StackStorm/orquesta.git@5151f38877ac7d05d0576c183900f780a7556539#egg=orquesta
git+https://github.com/StackStorm/orquesta.git@d038caf217cf63bca2364905160bab7655f81d99#egg=orquesta
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cryptography==2.4.2
eventlet==0.24.1
flex==6.14.0
git+https://github.com/Kami/logshipper.git@stackstorm_patched#egg=logshipper
git+https://github.com/StackStorm/orquesta.git@5151f38877ac7d05d0576c183900f780a7556539#egg=orquesta
git+https://github.com/StackStorm/orquesta.git@d038caf217cf63bca2364905160bab7655f81d99#egg=orquesta
git+https://github.com/StackStorm/python-mistralclient.git#egg=python-mistralclient
git+https://github.com/StackStorm/st2-auth-backend-flat-file.git@master#egg=st2-auth-backend-flat-file
gitpython==2.1.11
Expand Down
2 changes: 1 addition & 1 deletion st2common/in-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jsonschema
kombu
mongoengine
networkx
git+https://github.com/StackStorm/orquesta.git@5151f38877ac7d05d0576c183900f780a7556539#egg=orquesta
git+https://github.com/StackStorm/orquesta.git@d038caf217cf63bca2364905160bab7655f81d99#egg=orquesta
oslo.config
paramiko
pyyaml
Expand Down
2 changes: 1 addition & 1 deletion st2common/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apscheduler==3.5.3
cryptography==2.4.2
eventlet==0.24.1
flex==6.14.0
git+https://github.com/StackStorm/orquesta.git@5151f38877ac7d05d0576c183900f780a7556539#egg=orquesta
git+https://github.com/StackStorm/orquesta.git@d038caf217cf63bca2364905160bab7655f81d99#egg=orquesta
greenlet==0.4.15
ipaddr
jinja2
Expand Down
2 changes: 1 addition & 1 deletion st2common/st2common/services/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def request(wf_def, ac_ex_db, st2_ctx, notify_cfg=None):
# Publish the workflow execution requested state to the message bus.
if wf_ex_db.status not in states.COMPLETED_STATES:
wf_ex_db.context['st2']['workflow_execution_id'] = str(wf_ex_db.id)
wf_ex_db.flow['contexts'][0]['value']['st2']['workflow_execution_id'] = str(wf_ex_db.id)
wf_ex_db.flow['contexts'][0]['st2']['workflow_execution_id'] = str(wf_ex_db.id)
wf_ex_db = wf_db_access.WorkflowExecution.update(wf_ex_db, publish=False)
wf_db_access.WorkflowExecution.publish_status(wf_ex_db)
msg = '[%s] Workflow execution "%s" is published.'
Expand Down

0 comments on commit e7426a2

Please sign in to comment.