unable to alter env variable

Bug #1782305 reported by Kushal Agrawal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Incomplete
Medium
Unassigned

Bug Description

Hi, I have a requirement where a key already exists in env and I wants to update the value of it during workflow execution. But currently, it is not supported in Mistral.

Revision history for this message
Dougal Matthews (d0ugal) wrote :

It seems like we could solve this requirement by adding a new YAQL function.

Something like this:

    <% environment_update(dict) %>

We might prefer a way to update just a single key...

    <% environment_update(key, value) %>

The implementation should be easy, so I added the low-hanging-fruit tag. The hardest part here is probably coming up with a sensible API for the YAQL function.

Changed in mistral:
status: New → Confirmed
importance: Undecided → High
importance: High → Medium
tags: added: low-hanging-fruit
Changed in mistral:
milestone: none → rocky-3
Dougal Matthews (d0ugal)
Changed in mistral:
milestone: rocky-3 → stein-1
Dougal Matthews (d0ugal)
Changed in mistral:
milestone: stein-1 → none
Revision history for this message
Renat Akhmerov (rakhmerov) wrote :

I'm not sure it's a good idea in general. We assumed from the very beginning that it should be an immutable structure and in many places in the code we use that assumption. Also remember that Mistral passes an environment into sub workflows. How is that supposed to work if it becomes mutable? Should it be the same structure (i.e. modifications in sub workflows are seen in parents) or we need to copy?

I'd prefer to look at your use case first more carefully. Maybe there's a way to address it now by using existing mechanisms.

Revision history for this message
Renat Akhmerov (rakhmerov) wrote :

Marked it "Incomplete" for now since it's not 100% clear how to make the change properly. And we also need to look at the mentioned use case first.

Changed in mistral:
status: Confirmed → Incomplete
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.