Task with wait-before resets context

Bug #1681562 reported by Winson Chan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Confirmed
Medium
Unassigned

Bug Description

The following workflow will go into an infinite loop if there's a wait-before in task2. The state of var1 is reset in task2 if there's a wait-before. If wait-before is removed, the value in var1 is saved correctly.

version: '2.0'

sandbox.pub_wait:
    type: direct
    vars:
        var1: 0
        retries: 3
    output:
        vars:
            - <% $.var1 %>
            - <% $.var2 %>
    tasks:
        init:
            action: std.noop
            on-success:
                - task1
        task1:
            action: std.noop
            publish:
                var1: <% $.var1 + 1 %>
            on-success:
                - task2
        task2:
            wait-before: 3
            action: std.echo
            input:
                output: <% $.var1 %>
            publish:
                var2: <% task(task2).result %>
            on-success:
                - task1: <% $.var1 <= $.retries %>

Revision history for this message
Winson Chan (winson-c-chan) wrote :

It seems like the use of the cache @ https://github.com/openstack/mistral/blob/master/mistral/workflow/lookup_utils.py#L62 to get upstream task executions leads to getting the wrong in_context.

Dougal Matthews (d0ugal)
Changed in mistral:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.