You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the docs, when the schema fails it should not retry, but it does.
This is unnecessarily increasing the run time and cost.
Reproduction repo
added screenshot below.
To reproduce
convert-or-decrypt-link.ts
import{AbortTaskRunError,logger,schemaTask,tags}from'@trigger.dev/sdk';importtype{CnLinkSerial}from'cn-links';import{CnLink}from'cn-links';import{z}from'zod';import{decryptLink}from'./decrypt-link';exportconstconvertOrDecryptLink=schemaTask({id: 'convert-or-decrypt-link',schema: z.object({link: z.string().url(),}),// Set an optional maxDuration to prevent tasks from running indefinitelymaxDuration: 30,run: async(payload: {link: string}): Promise<CnLinkSerial>=>{consturl=newURL(payload.link);// do something. It triggers another task here and/or adds tags, so I know for sure that it fails during the initial schema.},});
Tested in production and local development.
Additional information
The text was updated successfully, but these errors were encountered:
This would match the error, it's 100% in the decrypt-link function and not convert-or-decrypt-link, because the URL schema is actually not illegal, HostnameSchema is causing it to fail.
But then it should still fail in the child task, not the parent task, and it should still not retry. The screenshot above shows no indication the the child task was even called, so I think this might be a problem where a child task is called with a schema.
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: 4.84 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
According to the docs, when the schema fails it should not retry, but it does.
This is unnecessarily increasing the run time and cost.
Reproduction repo
added screenshot below.
To reproduce
convert-or-decrypt-link.ts
Tested in production and local development.
Additional information
The text was updated successfully, but these errors were encountered: