WindmillWWindmill
Powered by
lfanewL
Windmillโ€ข2y agoโ€ข
9 replies
lfanew

Some parts of flow fails when parent_job is set

I'm currently dealing with an issue where a flow run will fail if the parent_job is set. If I don't pass a parent_job then the flow runs just fine.

Why might this be happening? Is this expected?

Here's a snippet of the step and the result. It seems like the items, which are set to the result of a previous step, are null (which they shouldn't be as the step returned results, see image below).

const items = results.b
let titles = []

items.forEach(function(e) {
    titles.push(`"[${e.title}](${e.link})`)
});
let result = 
`List these titles & links in Markdown. Make sure they are hyperlinked.
Add an emoji at the end of each one that matches the title as best as possible.
See an EXAMPLE for how to format.
---
EXAMPLE:
1. [Example 1](https://example1.com) ๐Ÿ‘จโ€๐Ÿ’ป
2. [Example 2](https://example2.com) ๐Ÿ•ฐ๏ธ
...
...
---
INPUT:
${titles.join("\n")}`
return result;
const items = results.b
let titles = []

items.forEach(function(e) {
    titles.push(`"[${e.title}](${e.link})`)
});
let result = 
`List these titles & links in Markdown. Make sure they are hyperlinked.
Add an emoji at the end of each one that matches the title as best as possible.
See an EXAMPLE for how to format.
---
EXAMPLE:
1. [Example 1](https://example1.com) ๐Ÿ‘จโ€๐Ÿ’ป
2. [Example 2](https://example2.com) ๐Ÿ•ฐ๏ธ
...
...
---
INPUT:
${titles.join("\n")}`
return result;


{
    "error": {
        "name": "InternalErr",
        "message": "Error during isolated evaluation of expression `const items = results.b\r\nlet titles = []\r\n\r\nitems.forEach(function(e) {\r\n    titles.push(`\"[${e.title}](${e.link})`)\r\n});\r\nlet result = \r\n`List these titles & links in Markdown. Make sure they are hyperlinked.\r\nAdd an emoji at the end of each one that matches the title as best as possible.\r\nSee an EXAMPLE for how to format.\r\n---\r\nEXAMPLE:\r\n1. [Example 1](https://example1.com) :man_technologist:\r\n2. [Example 2](https://example2.com) :clock:\r\n...\r\n...\r\n---\r\nINPUT:\r\n${titles.join(\"\\n\")}`\r\nreturn result;`:\nTypeError: Cannot read properties of null (reading 'forEach')\n    at <anon>:48:7\n    at eventLoopTick (ext:core/01_core.js:153:7)"
    }
}
{
    "error": {
        "name": "InternalErr",
        "message": "Error during isolated evaluation of expression `const items = results.b\r\nlet titles = []\r\n\r\nitems.forEach(function(e) {\r\n    titles.push(`\"[${e.title}](${e.link})`)\r\n});\r\nlet result = \r\n`List these titles & links in Markdown. Make sure they are hyperlinked.\r\nAdd an emoji at the end of each one that matches the title as best as possible.\r\nSee an EXAMPLE for how to format.\r\n---\r\nEXAMPLE:\r\n1. [Example 1](https://example1.com) :man_technologist:\r\n2. [Example 2](https://example2.com) :clock:\r\n...\r\n...\r\n---\r\nINPUT:\r\n${titles.join(\"\\n\")}`\r\nreturn result;`:\nTypeError: Cannot read properties of null (reading 'forEach')\n    at <anon>:48:7\n    at eventLoopTick (ext:core/01_core.js:153:7)"
    }
}
Screenshot20from202024-04-082019-42-01.png
WindmillJoin
3,388Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

We're live here https://discord.com/channels/930051556043276338/1278977038430240813

henri-c ยท 2d ago

rubenf

Infrastructure as code

rubenf ยท 3w ago

rubenf

As we're preparing for a new Windmill sandbox SDK, we took the opportunity **to open-source NSJAIL sandboxing** and make it available in CE and easier to set. In 1.634.0, just set nsjail to benefit from the tightest security and isolation per job. It's constraining so no need to use it unless you need but now you won't be restricted in security for CE if you need to.

rubenf ยท 4w ago

Similar Threads

Is it possible to group all entries in v2_job by the parent flow that they're part of?
wdesertWwdesert / help
9mo ago
Running a script fails when executed in a flow
BravoBBravo / help
16mo ago
Running a job from inside a flow
robottohfRrobottohf / help
3y ago
[Windmill Flow] Windmill Flow shared folder not deleted after job done
Naufal AlfaNNaufal Alfa / help
15mo ago