Skip to content

bug: [v4] batch completed does not reflect in parent task run #1958

Closed
@cachho

Description

@cachho

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

Might be the issue behind #1957 , because the symptom is the same: the run runs forever, although in this run I had a uncached subtask, so the batch completed.

Let's start from the beginning.

Reproduction repo

not available

To reproduce

  1. Launch a task (at least 1 uncached subtask) (see last one at the bottom)

Image

  1. Batches menu shows completed

Image

  1. Click it shows the failed uncached run (failing shouldn't be a problem, run[number].ok should just be false). So we know it's all here

Image

  1. Parent task is still running forever, with the batch specifically showing the gray bar in the timeline that signals a running task.

Image

Additional information

No response

Activity

cachho

cachho commented on Apr 20, 2025

@cachho
Author

It works as expected without idempotency keys inside the batchTriggerAndWait call.

    const results = await decryptLink.batchTriggerAndWait(
      decryptableLinks.map((link) => ({
        payload: { link: link.original! },
        // options: {
        //   idempotencyKey: link.original!,
        //   idempotencyKeyTTL: '1d',
        // },
      }))
    );

But I really need to avoid calling the same function twice, so this is still a big bug from my point of view.

matt-aitken

matt-aitken commented on Apr 28, 2025

@matt-aitken
Member

@cachho this should be fixed now. Update to the latest v4 packages and redeploy your tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @matt-aitken@cachho

        Issue actions

          bug: [v4] batch completed does not reflect in parent task run · Issue #1958 · triggerdotdev/trigger.dev