E58E Merge pull request #4572 from StackStorm/fix-orquesta-join-ctx · sec-js/st2@e7426a2 · GitHub
[go: up one dir, main page]

Skip to content

Commit e7426a2

Browse files
authored
Merge pull request StackStorm#4572 from StackStorm/fix-orquesta-join-ctx
Minor bug fix to orquesta for overwritten context on task join
2 parents 7b53886 + de28fb5 commit e7426a2

File tree

8 files changed

+17
-15
lines changed

8 files changed

+17
-15
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Fixed
3131
(improvement) StackStorm/orquesta#122.
3232
* Fix orquesta workflow stuck in running status when one or more items failed execution for a
3333
with items task. (bug fix) #4523
34+
* Fix orquesta workflow bug where context variables are being overwritten on task join.
35+
(bug fix) StackStorm/orquesta#112
3436

3537
2.10.2 - February 21, 2019
3638
--------------------------

contrib/examples/actions/workflows/orquesta-join.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,8 @@ version: 1.0
33
description: A basic workflow that demonstrate branching and join.
44

55
vars:
6-
- messages: null
7-
8-
output:
9-
- messages:
10-
- <% ctx().msg1 %>
11-
- <% ctx().msg2 %>
12-
- <% ctx().msg3 %>
13-
- <% ctx().msg4 %>
6+
- msg1: foobar
7+
- msg2: fubar
148

159
tasks:
1610
task1:
@@ -73,8 +67,14 @@ tasks:
7367
publish: msg4="I'll grind his bones to make my bread"
7468
do: task10
7569

76-
7770
# converge branches
7871
task10:
7972
join: all
8073
action: core.noop
74+
75+
output:
76+
- messages:
77+
- <% ctx().msg1 %>
78+
- <% ctx().msg2 %>
79+
- <% ctx().msg3 %>
80+
- <% ctx().msg4 %>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
git+https://github.com/StackStorm/orquesta.git@5151f38877ac7d05d0576c183900f780a7556539#egg=orquesta
1+
git+https://github.com/StackStorm/orquesta.git@d038caf217cf63bca2364905160bab7655f81d99#egg=orquesta
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Don't edit this file. It's generated automatically!
2-
git+https://github.com/StackStorm/orquesta.git@5151f38877ac7d05d0576c183900f780a7556539#egg=orquesta
2+
git+https://github.com/StackStorm/orquesta.git@d038caf217cf63bca2364905160bab7655f81d99#egg=orquesta

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cryptography==2.4.2
88
eventlet==0.24.1
99
flex==6.14.0
1010
git+https://github.com/Kami/logshipper.git@stackstorm_patched#egg=logshipper
11-
git+https://github.com/StackStorm/orquesta.git@5151f38877ac7d05d0576c183900f780a7556539#egg=orquesta
11+
git+https://github.com/StackStorm/orquesta.git@d038caf217cf63bca2364905160bab7655f81d99#egg=orquesta
1212
git+https://github.com/StackStorm/python-mistralclient.git#egg=python-mistralclient
1313
git+https://github.com/StackStorm/st2-auth-backend-flat-file.git@master#egg=st2-auth-backend-flat-file
1414
gitpython==2.1.11

st2common/in-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jsonschema
99
kombu
1010
mongoengine
1111
networkx
12-
git+https://github.com/StackStorm/orquesta.git@5151f38877ac7d05d0576c183900f780a7556539#egg=orquesta
12+
git+https://github.com/StackStorm/orquesta.git@d038caf217cf63bca2364905160bab7655f81d99#egg=orquesta
1313
oslo.config
1414
paramiko
1515
pyyaml

st2common/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apscheduler==3.5.3
44
cryptography==2.4.2
55
eventlet==0.24.1
66
flex==6.14.0
7-
git+https://github.com/StackStorm/orquesta.git@5151f38877ac7d05d0576c183900f780a7556539#egg=orquesta
7+
git+https://github.com/StackStorm/orquesta.git@d038caf217cf63bca2364905160bab7655f81d99#egg=orquesta
88
greenlet==0.4.15
99
ipaddr
1010
jinja2

st2common/st2common/services/workflows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def request(wf_def, ac_ex_db, st2_ctx, notify_cfg=None):
258258
# Publish the workflow execution requested state to the message bus.
259259
if wf_ex_db.status not in states.COMPLETED_STATES:
260260
wf_ex_db.context['st2']['workflow_execution_id'] = str(wf_ex_db.id)
261-
wf_ex_db.flow['contexts'][0]['value']['st2']['workflow_execution_id'] = str(wf_ex_db.id)
261+
wf_ex_db.flow['contexts'][0]['st2']['workflow_execution_id'] = str(wf_ex_db.id)
262262
wf_ex_db = wf_db_access.WorkflowExecution.update(wf_ex_db, publish=False)
263263
wf_db_access.WorkflowExecution.publish_status(wf_ex_db)
264264
msg = '[%s] Workflow execution "%s" is published.'

0 commit comments

Comments
 (0)
0