Can't execute task with env() in with-items

Bug #1839840 reported by Alex
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Renat Akhmerov

Bug Description

Hi!
After migrate from mistal 5 to Mistral 8.0.0.0rc2 we found exception:
Example workflow:
test_workflow_env:
  type: direct

  tasks:
    test_task:
      with-items:
       - env_param in <% env().input_array %>
      action: std.echo
      input:
        output:
          echo_result: <% $.env_param %>
      publish:
        result_of_task: <% task(test_task).result %>

Execution:
{
    "workflow_id": "d7099bb2-ed3a-43c5-a7d1-664165153239",
    "params": {
        "env": {
            "input_array": ["1","2","33"]
        }
    }
}

Produced exception:
Can not evaluate YAQL expression [expression=env().input_array, error=Unknown function \"#property#input_array\", data={}], wf=test_workflow_env, task=test_task

Revision history for this message
Alex (vedere-sie) wrote :
description: updated
Changed in mistral:
milestone: none → train-1
assignee: nobody → Renat Akhmerov (rakhmerov)
importance: Undecided → High
Changed in mistral:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

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

commit f92a5c8f445f132c230f20429bda0d1889996a84
Author: Renat Akhmerov <email address hidden>
Date: Thu Aug 29 15:34:23 2019 +0700

    Fix 'with-items' expression evaluation

    * There was a bug left after the recent refactoring. While
      evaluating 'with-items' expression we didn't construct a context
      view properly, it didn't include a workflow environment. This
      patch fixes it.

    Closes-Bug: #1839840
    Change-Id: I3df711ef2484374418085fe0117fe8b37ce5ba3f

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 9.0.0.0b1

This issue was fixed in the openstack/mistral 9.0.0.0b1 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.