Premature evaluation of "publish" if a task has "retry" with "continue-on"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
New
|
High
|
Unassigned |
Bug Description
Consider the following example:
wf:
tasks:
task1:
retry:
count: 10
delay: 1
on-success:
publish:
branch:
task2:
wait-before: 3
on-success:
publish:
global:
The problem is that the "publish" clause of "task1" gets evaluated after the first iteration of retry when "global_var" is not yet available in the global context, so it can't find the variable and fails with the error:
File "/Users/
task.
File "/Users/
result = f(*args, **kwargs)
File "/Users/
self.
File "/Users/
result = f(*args, **kwargs)
File "/Users/
data_
File "/Users/
task_
File "/Users/
data[key] = _evaluate_
File "/Users/
return evaluate(item, context)
File "/Users/
return evaluator.
File "/Users/
data_context
File "/Users/
", data=%s]" % (expression, str(e), data_context)
mistral.
] (execution_
If we move "wait-before" from "task2" to "task1" the example will be working.
The issue is in the design of task policies. In case if a task action (std.noop in our case since "action" is not explicitly specified) succeeds it will run the logic of task completion before the "retry" policy has a chance to change the flow. See how the method "complete" works at https:/
Changed in mistral: | |
importance: | Undecided → High |
milestone: | none → victoria-1 |
Changed in mistral: | |
milestone: | victoria-1 → wallaby-1 |