Skip to content

bug: [v4] parent function where all sub tasks are cached runs forever #1957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cachho opened this issue Apr 20, 2025 · 3 comments
Closed

bug: [v4] parent function where all sub tasks are cached runs forever #1957

cachho opened this issue Apr 20, 2025 · 3 comments

Comments

@cachho
Copy link

cachho commented Apr 20, 2025

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.

Image

The child tasks don't have runs:

Image

Which you also see when going through the batch menu, it's running forever,

Image

But clicking a batch shows no runs.

Image

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.

@cachho
Copy link
Author

cachho commented Apr 20, 2025

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.

@cachho
Copy link
Author

cachho commented Apr 22, 2025

#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.

@matt-aitken
Copy link
Member

@cachho this should be fixed in the latest v4 beta. Update to the latest package and redeploy your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants