Worker version already exists error when deploying old worker again


We are using worker versioning to deploy newer workers to prevent non-deterministic error when things change in our workflow. For deploying a new version, we keep the old version running and we deploy the newer versions. While doing this we are running into the following error consistently:

{"error":{"cause":{"code":3,"details":"**version 1.8.0 already exists**","metadata":{"content-type":["application/grpc"]}}},"level":"error","message":"Issue while setting up temporal worker","timestamp":"2023-09-19T20:52:03.765Z"}

The version mentioned in the above error is the older version. While deploying the new version, for some reason our deploy tool re-deploys the old version as well. Could this be the reason for the above error?

Any ideas what we might be doing wrong while deploying the new version.

This error indicates that you’re trying to set build ID 1.8.0 as default for the queue but it’s already set as non default.

Thank you, we had a bug in compatibility update logic.

It looks like today it’s not possible to remove sets/buildIds. I can do it by removing records per task queue in task_queue_user_data and build_id_to_task_queue if I want to reset sets. But is there a better way?

We don’t allow manually removing build IDs because workflows may be linked to them and would get stuck.
There’s a scavenger process that automatically removes build IDs that have no references.

1 Like