upstream tasks calculation is wrong
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
High
|
Winson Chan |
Bug Description
In the following example, the WF is straightfoward. The notify is a task executed after each tasks. On calculation of upstream tasks for notify, you'll see the number of upstream tasks for each call of notify include all previous tasks. Is this correct? Shouldn't it be only the immediate upstream task? Currently, this creates an error where merge dicts @ https:/
diff --git a/mistral/
index b4f34cc..74523c4 100644
--- a/mistral/
+++ b/mistral/
@@ -45,6 +45,10 @@ def prepare_
)
+ LOG.info("[%s] NUM UPSTREAM TASKS: %s", exec_db.id, len(upstream_
+ for task in upstream_db_tasks:
+ LOG.info("[%s] UPSTREAM TASK FOR %s: %s", exec_db.id, task_db.name, task.name)
+
task_
~$ cat ~/tmp/test-
version: "2.0"
name: "test-upstream-
workflows:
main:
type: direct
input:
- subject
- adjective
output:
on-error:
- fail
tasks:
notify:
$ mistral workbook-create ~/tmp/test-
Starting new HTTP connection (1): localhost
+------
| Field | Value |
+------
| Name | test-upstream-tasks |
| Tags | <none> |
| Created at | 2015-03-04 01:09:53.453036 |
| Updated at | None |
+------
$ mistral execution-create test-upstream-
Starting new HTTP connection (1): localhost
+------
| Field | Value |
+------
| ID | 47d8a520-
| Workflow | test-upstream-
| State | RUNNING |
| Created at | 2015-03-
| Updated at | 2015-03-
+------
$ mistral execution-list
Starting new HTTP connection (1): localhost
+------
| ID | Workflow | State | Created at | Updated at |
+------
| 47d8a520-
+------
$ sudo tail -n 1000 /var/log/
2015-03-04 01:10:31,524 139727930081520 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:31,746 139727923264080 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:31,746 139727923264080 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:31,752 139727923264080 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:31,752 139727923264080 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:31,752 139727923264080 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:31,904 139727918671344 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:31,904 139727918671344 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:31,909 139727918671344 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:31,909 139727918671344 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:31,909 139727918671344 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:31,909 139727918671344 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:32,045 139727923265040 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:32,045 139727923265040 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:32,045 139727923265040 INFO data_flow [-] [47d8a520-
2015-03-04 01:10:32,045 139727923265040 INFO data_flow [-] [47d8a520-
$ mistral task-list
Starting new HTTP connection (1): localhost
+------
| ID | Name | Workflow name | Execution ID | State |
+------
| 0531f929-
| 30eab942-
| 96379ab6-
| a832ab44-
| bb0ed3e5-
| 3fe580fa-
+------
$ mistral task-get-input 3fe580fa-
Starting new HTTP connection (1): localhost
{
"output": "@print_adjective"
}
$ mistral task-get-input bb0ed3e5-
Starting new HTTP connection (1): localhost
{
"output": "@print_subject_1"
}
$ mistral task-get-input 30eab942-
Starting new HTTP connection (1): localhost
{
"output": "@print_subject_1"
}
Changed in mistral: | |
milestone: | none → kilo-3 |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in mistral: | |
assignee: | nobody → Winson Chan (winson-c-chan) |
Changed in mistral: | |
status: | Fix Committed → Fix Released |
Changed in mistral: | |
milestone: | kilo-3 → 2015.1 |
Reviewed: https:/ /review. openstack. org/161552 /git.openstack. org/cgit/ stackforge/ mistral/ commit/ ?id=73010a88a88 f55bc654687ca26 f7f4dc8ca44b2f
Committed: https:/
Submitter: Jenkins
Branch: master
commit 73010a88a88f55b c654687ca26f7f4 dc8ca44b2f
Author: Winson Chan <email address hidden>
Date: Thu Mar 5 23:08:52 2015 +0000
Fix list of upstream tasks for task with no join
Currently, if a task is referenced multiple times in the workflow,
the upstream tasks identified are all the tasks that reference it.
However, the upstream task should only be the immediate parent if
there is no join in the task spec. If the task has a join, then the
upstream tasks should only be all the immediate parents that end
with the join and not every parent tasks that reference it. This
patch only fixes task with no join.
Change-Id: Iacf7cf5da3c91d ea5412728624146 873092d3686
Closes-Bug: 1427933