What happens when you update a step/workflow code while they’re still running #99
-
|
Say I have a workflow that runs for 2 months. It's live in prod, and we have running workflows already. What happens when I make changes to one of its steps, or to the workflow itself? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Very interested in hearing the answer to this. I think this determines whether we can rely on workflow in production. If I use this to handle my analytics queue and make code changes, what rules must I follow to ensure my queued events and workflows continue to run after deployment? In addition, do they run on the old code branches, meaning that if I notice a bug in my workflow that I cannot fix, it will prevent queued events from encountering it, or does it somehow magically run on the new code? |
Beta Was this translation helpful? Give feedback.
-
|
Runs are tied to a specific deployment. So, if you deploy a new version, existing runs continue running on whatever deployment they were triggered on. Changes to steps and workflow code won't affect them. So, if you do make a code change (let's say to fix a bug), you would deploy a new version. New runs will start to run on the latest version. You will then be able to use the CLI (or the web UI packaged with the CLI, or the Vercel Dashboard) to "upgrade" runs from the old version to the new version. Upgrading can mean two things
There's a lot that can be built on top of this to get the DX right (its's a hard challenge) - but that's essentially the idea Understandably, this implementation works best with worlds that support serverless runtimes and can keep old versions around (Vercel, for example). For serverfull runtimes that can't do version pinning, we will need to find an alternate solution that works well. |
Beta Was this translation helpful? Give feedback.
Runs are tied to a specific deployment. So, if you deploy a new version, existing runs continue running on whatever deployment they were triggered on. Changes to steps and workflow code won't affect them.
So, if you do make a code change (let's say to fix a bug), you would deploy a new version. New runs will start to run on the latest version. You will then be able to use the CLI (or the web UI packaged with the CLI, or the Vercel Dashboard) to "upgrade" runs from the old version to the new version.
Upgrading can mean two things