bug: [v4] parent function where all sub tasks are cached runs forever
Provide environment information
System: OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa) CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor Memory: 6.32 GB / 15.59 GB Container: Yes Shell: 3.7.1 - /usr/bin/fish Binaries: Node: 18.20.8 - ~/.local/share/nvm/v18.20.8/bin/node npm: 10.8.2 - ~/.local/share/nvm/v18.20.8/bin/npm pnpm: 8.6.3 - ~/.local/share/pnpm/pnpm
Describe the bug
I have a trigger function that calls multiple child trigger functions. They are all cached. It now runs forever.
The child tasks don't have runs:
Which you also see when going through the batch menu, it's running forever,
But clicking a batch shows no runs.
Reproduction repo
not available
To reproduce
The child tasks are triggered with
const results = await decryptLink.batchTriggerAndWait(
linksInChunk.map((link) => ({
payload: { link: link! },
options: {
idempotencyKey: link!,
idempotencyKeyTTL: '1d',
},
}))
);
Only tested in development.
Additional information
It could be a problem with how the parent function works or caching or the batch trigger itself.
I simplified my function and removed the chunking (here's why I used it: https://feedback.trigger.dev/p/support-more-than-100-items-in-batchtrigger-at-once).
I can confirm that the issue is still here.
#1958 - looks like this has more to do with idempotency keys and less with whether they have been cached before or not. Still keeping this open, because I can't be sure.
@cachho this should be fixed in the latest v4 beta. Update to the latest package and redeploy your code.