Production / Workflow or Worker Versioning

We are currently using temporal as workflow solution in a couple of the products, so we are looking support in order to understand what’s the best approach to handle versioning:

I read about worker versioning that is in pre-release but seems like involve a bit of infrastructure stuff in order to have different version of workers running at the same time until the old ones are not use and get deleted.

I would like to hear an expanded view of this and what other tools do we need to achieve this automatically.

Question like

  • How can I remove old worker automatically?
  • How can I deploy a new version of workers without delete the existing one if there are processing something?

I would like to understand better the implication of have this in production and what we need to be reliable?

Hi @Andres_Felipe_Benavi

I read about worker versioning that is in pre-release but seems like involve a bit of infrastructure stuff in order to have different version of workers running at the same time until the old ones are not use and get deleted.

Note that what we have in doc today (Worker Versioning (Legacy) | Temporal Documentation ) is deprecated and the new API is described here temporal/docs/worker-versioning.md at main · temporalio/temporal · GitHub

Question like

  • How can I remove old worker automatically?
  • How can I deploy a new version of workers without delete the existing one if there are processing something?

Assuming you don’t have to query closed workflows, you can shutdown the worker when there are no running workflows for the same BuildID the worker has, using the Search Attribute BuildIds

As you mentioned before, this is in pre-release. Have to explore the other versioning strategies described here?

Antonio

Yeah, I have reviewed the other strategies, but basically I am trying to collect relevant information since my idea is share this with other teams, so I am trying to elaborate a strong opinion about the best approach to version workflow to make easier the development experience.

Specifically I was really curious about the approaches that need some sort of manual stuff even after the deployment e.g query executions in order to remove old workers, remove duplicated code, etc, since it sound a bit manual, so I am trying to figure it out if there is any automated way to achieve this, even if we need to develop an internal tool, since we are using k8s, in that way the developer are just taking care of the code

Also I am really new with temporal, so I do not if the reality today is that the developer need to deal with some sort of manual stuff not matter the strategy.