Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

Gotcha - ok, thank you! I'll do some

Gotcha - ok, thank you! I'll do some experimentation later today to see if I can get it to work with another worker w/ service bindings - and if not, probably another worker doing a normal fetch().

can someone confirms AsyncLocalStorage

can someone confirms AsyncLocalStorage will not behave as expected in a step fn unless the callback is defined inline ? ```ts async run(event: WorkflowEvent<Params>, step: WorkflowStep) { await context.run({ id: "124" }, async () => { // loadFile will get undefined when calling content.getStore() ...

Hey!

Hey! I'm trying to use Workflows within an existing Workers project. The project is using vite to build a remix app. But I'm getting this error if I try to add a workflows configuration into wrangler.jsonc: ```Worker "workflows:workflow"'s binding "USER_WORKFLOW" refers to service "core:user:" with a named entrypoint "ExcelImportWorkflow", but "core:user:" has no such named entrypoint....

Workers RPC — Lifecycle · Cloudflare Wor...

Hi all! I'm running into the following error when using Workflows: An RPC stub was not disposed properly. You must call dispose() on all stubs in order to let the other side know that you are no longer using them. You cannot rely on the garbage collector for this because it may take arbitrarily long before actually collecting unreachable objects. As a shortcut, calling dispose() on the result of an RPC call disposes all stubs within it. I see that step.do expects to return Rpc.Serializable<unknown>, so I did a little bit of reading about the RPC lifecycle here and found that in the context of Worker Service Bindings, you should either use the experimental using syntax, or explicitly call object[Symbol.dispose](). ...

Hi folks - having some trouble with

Hi folks - having some trouble with throwing errors inside a workflow. First, it seems throwing a NonRetryableError, is retried as many times as specified Second, I can't seem to find out where the throw error messages are being returned in the workflow status. The docs seem to say const wf = await MY_WORKFLOW.get(id) and then await wf.status() should return errors, but they are always empty....

is `npx wrangler types` supposed to work

is npx wrangler types supposed to work for workflows? wrangler.toml: services = [{ binding = "WORKFLOW_PROCESS_TRANSACTIONS", service = "money" }] wrangler version: wrangler 3.107.3 generated interface, WORKFLOW_PROCESS_TRANSACTIONS should be Workflow? ```...

Workflow limits

Ok thanks, well this is somewhat concerning if there are some tasks which use memory too much. That's why may be my workflow steps are throwing an error of cpu/memory limit after doing work of around 128 MiB ( nearly ) But on retry it's again working till 128 MiB ...

Hi all. Is it possible to pause/resume

Hi all. Is it possible to pause/resume workflow steps and wait for user input? We're using workflows for order processing. For new users, we require that the user verifies their identity with an external KYC provider. Is there a way to wrap this in a step that will block until the user has verified their identity? Some kind of signal mechanism similar to what Temporal has? Thanks in advance....

Error handling seems quite complex. I

Error handling seems quite complex. I have a tail worker that should post to the bug tracking app, but it doesn't seem to catch exceptions at all tail worker excerpt: ``` async tail(events, env, ctx) {...

I'm getting this error with the

I'm getting this error with the cloudflare blank starter repo when I change the index.ts to use workflows (the test passed before0 ``` [vpw:inf] Starting isolated runtimes for vitest.config.mts... Worker "workflows:telegram-mod-wf"'s binding "USER_WORKFLOW" refers to service "core:user:vitest-pool-workers-runner-" with a named entrypoint "MessageHandler", but "core:user:vitest-pool-workers-runner-" has no such named entrypoint....

Flowcesinha

I know you did that in your free time, and I really appreciate it, i'll be using it, but can we expect these features to be built-in in the future? 👀

Can you share more details? What does

Can you share more details? What does the full error message return? Just connection error? How many concurrent Workflows are running?

CPU/Memory Limit error message

Hi, I was testing the workflow and performing some heavy tasks (really intensive ones), and occasionally encountered the error: "The step crashed the worker (or exceeded CPU/Memory limits) during this attempt."...

I've started playing with workflows, and

I've started playing with workflows, and ran into the following issue. wonder if it could be related to Workflows? https://discordapp.com/channels/595317990191398933/1324112336121888858/1324112336121888858...

I'm using workflows and I really like

I'm using workflows and I really like the built-in design to retry individual steps, very much like a multi-queue solution for each step. However, I'm also using queues to trigger N instances of the workflow as I want to space out some external calls, so I'm using delay with the queue. But I'd very much like the workflow to receive the original batch. This would allow for a much more robust acknowledgement and retry mechanism. If the workflow has access to the JS API of the queue batch, it will be able to control acknowledgment of the message. By retrying the queue message, it will be able to revert back executed steps by retrying the queue message and triggering a new workfow instance resetting the state....

Workers Observability <> Workflows

I'm now using Workflows in production. Dozens of runs, everything works great! The ability to view each instance in the dashboard is very cool and helps a lot. I have noticed, however, that each instance run produced an error log like this: ``` {...

On your first point, not necessarily,

On your first point, not necessarily, since if the first run makes the 1,000 requests, stores its state, and is restarted, it will skip those first 1k requests

Is this in prod? Local dev? What version

Is this in prod? Local dev? What version of wrangler?

DLQ Equivalent

Is there a deadletter "queue" equivalent for workflows/workflow steps? Ie. I want to know when a step stopped retrying so I can manually intervene.
Next