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,362Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c ยท 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra ยท 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 ๐Ÿ™‚

henri-c ยท 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
8mo ago
Running a script fails when executed in a flow
BravoBBravo / help
16mo ago
Running a job from inside a flow
robottohfRrobottohf / help
2y ago
[Windmill Flow] Windmill Flow shared folder not deleted after job done
Naufal AlfaNNaufal Alfa / help
14mo ago