Skip to content

[Bug] Worker deployment delete error #813

@rblin081

Description

@rblin081

What are you really trying to do?

I created a worker deployment / associated version to test out the functionality. I would now like to delete that deployment and effectively un-version the worker.

Describe the bug

When running the command temporal worker deployment delete --name I'm receiving an error

Minimal Reproduction

List the worker deployments in the default namespace

temporal worker deployment list
         Name         CreateTime     CurrentVersion     RampingVersion  RampingVersionPercentage
  hello-world-worker  4 days ago  hello-world-worker.1  <none>                                 0
  1                   5 days ago  __unversioned__       <none>  

Try to delete the hello-world-worker deployment

temporal worker deployment delete --name hello-world-worker
time=2025-06-17T09:57:38.541 level=ERROR msg="error deleting worker deployment: something went wrong, please retry (d564d36c)"

See this error in the logs

Logs
{"level":"error","ts":"2025-06-17T13:57:38.299Z","msg":"deployment client error","error":"deployment has versions, can't be deleted","operation":"DeleteWorkerDeployment","elapsed":0.015479153,"args":["default","hello-world-worker","temporal-cli:xxx"],"logging-call-at":"/home/runner/work/docker-builds/docker-builds/temporal/service/worker/workerdeployment/client.go:1205","stacktrace":"go.temporal.io/server/common/log.(*zapLogger).Error\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/log/zap_logger.go:154\ngo.temporal.io/server/service/worker/workerdeployment.(*ClientImpl).DeleteWorkerDeployment.(*ClientImpl).record.func1\n\t/home/runner/work/docker-builds/docker-builds/temporal/service/worker/workerdeployment/client.go:1205\ngo.temporal.io/server/service/worker/workerdeployment.(*ClientImpl).DeleteWorkerDeployment\n\t/home/runner/work/docker-builds/docker-builds/temporal/service/worker/workerdeployment/client.go:753\ngo.temporal.io/server/service/frontend.(*WorkflowHandler).DeleteWorkerDeployment\n\t/home/runner/work/docker-builds/docker-builds/temporal/service/frontend/workflow_handler.go:3538\ngo.temporal.io/api/workflowservice/v1._WorkflowService_DeleteWorkerDeployment_Handler.func1\n\t/home/runner/go/pkg/mod/go.temporal.io/api@v1.46.0/workflowservice/v1/service_grpc.pb.go:3447\ngo.temporal.io/server/common/rpc/interceptor.(*RetryableInterceptor).Intercept.func1\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/retry.go:62\ngo.temporal.io/server/common/backoff.ThrottleRetryContext\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/backoff/retry.go:89\ngo.temporal.io/server/common/rpc/interceptor.(*RetryableInterceptor).Intercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/retry.go:66\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*CallerInfoInterceptor).Intercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/caller_info.go:64\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*SDKVersionInterceptor).Intercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/sdk_version.go:68\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*RateLimitInterceptor).Intercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/rate_limit.go:88\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*NamespaceRateLimitInterceptor).Intercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/namespace_rate_limit.go:85\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*ConcurrentRequestLimitInterceptor).Intercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/concurrent_request_limit.go:107\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*NamespaceValidatorInterceptor).StateValidationIntercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/namespace_validator.go:221\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*HealthInterceptor).Intercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/health.go:65\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*TelemetryInterceptor).UnaryIntercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/telemetry.go:197\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*Redirection).handleRedirectAPIInvocation.func2\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/redirection.go:265\ngo.temporal.io/server/common/rpc/interceptor.(*NoopRedirectionPolicy).WithNamespaceRedirect\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/dc_redirection_policy.go:125\ngo.temporal.io/server/common/rpc/interceptor.(*Redirection).handleRedirectAPIInvocation\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/redirection.go:262\ngo.temporal.io/server/common/rpc/interceptor.(*Redirection).Intercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/redirection.go:222\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/authorization.(*Interceptor).Intercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/authorization/interceptor.go:178\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/service/frontend.GrpcServerOptionsProvider.NewServerMetricsContextInjectorInterceptor.func2\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/metrics/grpc.go:65\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*NamespaceLogInterceptor).Intercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/namespace_logger.go:84\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*NamespaceValidatorInterceptor).NamespaceValidateIntercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/namespace_validator.go:132\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/service/frontend.GrpcServerOptionsProvider.NewFrontendServiceErrorInterceptor.func1\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/grpc.go:178\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc.ServiceErrorInterceptor\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/grpc.go:157\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1217\ngo.temporal.io/server/common/rpc/interceptor.(*MaskInternalErrorDetailsInterceptor).Intercept\n\t/home/runner/work/docker-builds/docker-builds/temporal/common/rpc/interceptor/mask_internal_error.go:65\ngoogle.golang.org/grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1208\ngo.temporal.io/api/workflowservice/v1._WorkflowService_DeleteWorkerDeployment_Handler\n\t/home/runner/go/pkg/mod/go.temporal.io/api@v1.46.0/workflowservice/v1/service_grpc.pb.go:3449\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1405\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1815\ngoogle.golang.org/grpc.(*Server).serveStreams.func2.1\n\t/home/runner/go/pkg/mod/google.golang.org/grpc@v1.71.0/server.go:1035"}

Then tried to delete the version, which also errored

temporal worker deployment delete-version --version hello-world-worker.1
time=2025-06-17T10:07:54.029 level=ERROR msg="error deleting worker deployment version: something went wrong, please retry (36634b00)"

Environment/Versions

  • OS and processor: MacBook M1 Pro Sequoia 15.5
  • Temporal Version:
temporal operator cluster system
  ServerVersion  SupportsSchedules  UpsertMemo  EagerWorkflowStart
  1.27.2         true               true        true  
  • Temporal server hosted on EKS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions