You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the optional chaining operator (?.) a lot in windmill to ensure steps run smoothly regardless of return values in prior steps. There is a functional inconsistency between the actual flow running and when using "test this step" when using it against the results object.
To reproduce
Step up a flow that has two steps, with the first step producing an output object and the second step connected directly to a field of that output object.
When connecting the second step, use standard dot notion against the results object.
In the second step, use the "Test this Step" refresh button to see data load from the first step as a parameter, mimicking windmill flow functionality.
Witness the data flow into the step as per normal by testing the second step.
Use the "Test Flow" button and run the flow as per normal, witnessing the data flow as per normal between the first step to the second step.
Return to the editor, and replace the dot notation to optional chaining in the second step, i.e. results?.a.foo
Use the "Test this Step" refresh button again to see the data load as a parameter, repeating the same functionality as in bullet point 3.
Witness the data flow into the step as per normal by testing the second step, same functionality in bullet point 4.
Use the "Test Flow" button and run the flow again, but this time you see that the second step does NOT get the data passed in as a parameter, breaking the expectation that it was going to be loaded.
Expected behavior
All I expect is consistency between the flow editor and flow runs. I have had a few bugs popup and took me a bit to
Two potential solutions:
Don't allow optional chaining against the results object directly when linking data between flows. It should be noted that this only happens when you optional chain against results directly, implying that results isn't really an object but some proxy between step outputs. (Aka, trying to pass results as a parameter to a step as-a-whole does not work). Either a warning/red squiggle in the flow editor should popup as a consequence of trying to optional chain against results
Repair functionality for optional chaining against the results object in the backend to match the functionality of the flow editor
Screenshots
Screencast.from.02-24-2025.01.23.57.PM.webm
Browser information
Firefox 135 and Chrome 130
Application version
EE v1.466.3-14-g3188bee46
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
I use the optional chaining operator (?.) a lot in windmill to ensure steps run smoothly regardless of return values in prior steps. There is a functional inconsistency between the actual flow running and when using "test this step" when using it against the
results
object.To reproduce
results
object.results?.a.foo
Expected behavior
All I expect is consistency between the flow editor and flow runs. I have had a few bugs popup and took me a bit to
Two potential solutions:
Don't allow optional chaining against the
results
object directly when linking data between flows. It should be noted that this only happens when you optional chain againstresults
directly, implying thatresults
isn't really an object but some proxy between step outputs. (Aka, trying to passresults
as a parameter to a step as-a-whole does not work). Either a warning/red squiggle in the flow editor should popup as a consequence of trying to optional chain againstresults
Repair functionality for optional chaining against the
results
object in the backend to match the functionality of the flow editorScreenshots
Screencast.from.02-24-2025.01.23.57.PM.webm
Browser information
Firefox 135 and Chrome 130
Application version
EE v1.466.3-14-g3188bee46
Additional Context
No response
The text was updated successfully, but these errors were encountered: