trigger.dev icon indicating copy to clipboard operation
trigger.dev copied to clipboard

[TRI-3194] Dev command child runs don't execute (Windows WSL)

Open matt-aitken opened this issue 1 year ago • 1 comments

Provide environment information

Running Windows with WSL.

System: OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish) CPU: (16) x64 AMD Ryzen 7 PRO 7840HS w/ Radeon 780M Graphics Memory: 19.77 GB / 30.68 GB Container: Yes Shell: 5.8.1 - /usr/bin/zsh Binaries: Node: 18.19.1 - ~~/.nvm/versions/node/v18.19.1/bin/node Yarn: 1.22.22 - /mnt/c/Program Files/nodejs/yarn npm: 10.2.4 - ~~/.nvm/versions/node/v18.19.1/bin/npm pnpm: 8.15.3 - ~~/.nvm/versions/node/v18.19.1/bin/pnpm

Describe the bug

Child runs don't work, they just stay in the "queued" status until they expire. There are no other runs executing.

Reproduction repo

To reproduce

export const parentTask = task({
  id: 'parent'
  run: async (payload: { organizationId: string }) => {
    console.log(`Start parent`);
    
    await childTask.triggerAndWait({
       organizationId: payload.organizationId
    });
  }
});

const childTask = task({
  id: 'child',
  run: async (payload: { organizationId: string }) => {
    console.log(`Child task`);
  }
});

"Start parent" is logged on the console. Child is stuck in "Executing" and also doesn't log anything. Config I have:

export const config: TriggerConfig = {
  project: 'proj_xx',
  logLevel: 'log',
  retries: {
    enabledInDev: true,
    default: {
      maxAttempts: 3,
      minTimeoutInMs: 1000,
      maxTimeoutInMs: 10000,
      factor: 2,
      randomize: true
    }
  }
};

Additional information

No response

From SyncLinear.com | TRI-3194

matt-aitken avatar Jul 27 '24 13:07 matt-aitken

I've had a similar issue (child tasks are stuck in 'queued' in dev env), running on windows.

  System:
    OS: Windows 10 10.0.22631
    CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
    Memory: 11.65 GB / 31.93 GB
  Binaries:
    Node: 21.7.3 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.6.1 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD

Adding export before the const childTask = task seems to be a fix here (at least it helped me).

denis-urban avatar Aug 13 '24 08:08 denis-urban

Can confirm. Exporting the child task also works for me.

patrick-yendou avatar Aug 13 '24 13:08 patrick-yendou