Join and task context

Bug #1705394 reported by Vitalii Solodilov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Vitalii Solodilov

Bug Description

Hello mistral team!
We found bug in ocata 4.0.2 release.

Task contains "__task_execution" context of previous task after join operation.
Accordingly, yaql function "task()" are not performed correctly. But "task(task_name)" returns correct result.

Simple test case:

    def test_join_saving_task_context(self):
        workflow = """
            version: "2.0"

            test_workflow:
              type: direct

              tasks:
                task1:
                  on-success:
                    - task2

                task2:
                  join: all

        """

        wf_service.create_workflows(workflow)

        wf_ex = self.engine.start_workflow('test_workflow', {})

        self.await_workflow_success(wf_ex.id)

        with db_api.transaction():
            wf_ex = db_api.get_workflow_execution(wf_ex.id)

            tasks = wf_ex.task_executions

            for task in tasks:
                task_id = task.id
                task_id_in_context = task.in_context['__task_execution']['id']

                self.assertEqual(task_id, task_id_in_context,
                                 "Context id mismatches with {} id".format(task.name))

summary: - join and task context
+ Join and task context
Changed in mistral:
assignee: nobody → Vitalii Solodilov (mcdoker18)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

Fix proposed to branch: master
Review: https://review.openstack.org/510384

Changed in mistral:
status: New → In Progress
Changed in mistral:
milestone: none → queens-1
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/510759

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/510384
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=b205e21310eab5d05849a085435751819e618903
Submitter: Zuul
Branch: master

commit b205e21310eab5d05849a085435751819e618903
Author: Vitalii Solodilov <email address hidden>
Date: Mon Oct 9 03:52:23 2017 +0400

    'all' parameter breaks task context

    The previous context of task is injected in the current task when contains 'all' operation.
    For example, the expression function 'task' no longer works.

    Change-Id: I04a0e7e7a2b8d37346c1aadfad8d7a6b972abcbe
    Closes-Bug: 1705394
    Signed-off-by: Vitalii Solodilov <email address hidden>

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/517604

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (stable/pike)

Reviewed: https://review.openstack.org/517604
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=57b92c5055bea2730e3583742137f9727ac95499
Submitter: Zuul
Branch: stable/pike

commit 57b92c5055bea2730e3583742137f9727ac95499
Author: Vitalii Solodilov <email address hidden>
Date: Mon Oct 9 03:52:23 2017 +0400

    'all' parameter breaks task context

    The previous context of task is injected in the current task when contains 'all' operation.
    For example, the expression function 'task' no longer works.

    Change-Id: I04a0e7e7a2b8d37346c1aadfad8d7a6b972abcbe
    Closes-Bug: 1705394
    Signed-off-by: Vitalii Solodilov <email address hidden>
    (cherry picked from commit b205e21310eab5d05849a085435751819e618903)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on mistral (master)

Change abandoned by Renat Akhmerov (<email address hidden>) on branch: master
Review: https://review.openstack.org/510759
Reason: Was already fixed by https://review.openstack.org/#/c/510384

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 5.2.0

This issue was fixed in the openstack/mistral 5.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 6.0.0.0b2

This issue was fixed in the openstack/mistral 6.0.0.0b2 development milestone.

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.