Versioning with continueAsNew?

Hi all,

I have a simple question about continueAsNew. Sorry if it has been asked before.

I’m familiar with the concept of versioning so that existing workflows will continue to run the old code while newer workflows can run a newer version of the code.

I’d like to understand at what point it is safe to clean up the old versioning branch.
My application has long-running workflows, however we continueAsNew regularly to avoid hitting event/signal limits. If a workflow on Version A calls continueAsNew, will the newly continued workflow be running on Version B? Or will it remain on the Version A like the original workflow?

We recommend calling continue as new on both signal count and some time interval. For example once a week. This way, you can guarantee that after a week, all workflows are using the latest version.

Good to know. Thanks for the clarification. I’ll make sure this happens

One other question. Aside from continuing as new regularly, is there any best practice to confirm that it’s safe to remove a version branch?

My team is looking for some way to 100% know without a shadow of a doubt that a branch can be removed. Sounds like maybe the only way is to continueAsNew on some time interval to guarantee that after x days then the code can be safely removed.

You can list/count workflows that use a specific branch version.