#Child tasks dont start

1 messages · Page 1 of 1 (latest)

jovial nest
#

Hello,

I'm trying to call child task from a parent, and it seems the child is running indefinitely and never starts. I tried both trigger and triggerAndWait.

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
    }
  }
};
#

Child tasks dont start

cedar prawn
#

What version of the SDK/CLI are you using? Is this in the Dev environment? Can you drop me a link to a run for the parent task that has this problem?

jovial nest
#

Also tried v45 and same issue. Not sure what I'm doing wrong, because the setup is pretty basic.

cedar prawn
#

What version of Node are you running?

jovial nest
#

Locally? 18.19.1

cedar prawn
#

The issue is that the child run is queued, I'm just trying to figure out why

jovial nest
#

Thanks

cedar prawn
#

Your queues all look fine.

#

Can you try re-running and after it reach the child task, stopping and restarting the dev command?

#

I want to see if it correctly stops the runs

jovial nest
#

Yeah let me try that

cedar prawn
#

This is working for other users so it's an edge case of some kind that we're not dealing with that only happens on dev

jovial nest
#

The child was canceled right when I killed the dev command

cedar prawn
#

Ok good, so the socket connection seems to be fine.

#

Can you try running the dev command with --log-level debug at the end?

#

I'm a bit stumped by this, I've not seen this before

jovial nest
#
@company/platform:dev: }
[run_pqhev5ndc854f4w2sok7h.1] executing task run { pid: 518575 }
○ Jul 27, 15:45:48.506 run_pqhev5ndc854f4w2sok7h.1 Start parent
@company/platform:dev: 

Not much to see 🤔

cedar prawn
#

Instead of triggerAndWait if you do trigger does it trigger that run?

jovial nest
#

No I tried that already. Same issue

cedar prawn
#

Could you run this and paste the result in here? npx envinfo --system --binaries

#

We'll need to try reproduce this to figure it out

jovial nest
#
➜ ✗ npx envinfo --system --binaries

  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
#

So I guess I can't use child workflows rn and need to wait until you figure it out?

cedar prawn
#

How did you run the command? Using npx, yarn or pnpm?

jovial nest
#

I ran exactly what you sent me using npx

cedar prawn
#

Yeah sorry we'll have to take a look into this. I'm guessing it's an Ubuntu issue of some kind or maybe a specific version of Node

jovial nest
#

I'm using windows with WSL btw

cedar prawn
#

Ah ok that's good to know

jovial nest
#

Ok, just let me know if you need me to do some more testing.