[Bug] Worker deployment delete error

未关闭
#813 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
go
领域
cli

调研方向

首先,针对报告的服务器配置,复现 issue 中描述的 temporal worker deployment delete --name 和 delete-version 命令。跟踪 worker deployment 的删除路径,包括 service/worker/workerdeployment/client.go 中第 753 行和第 1205 行附近的代码,并将 CLI 错误与服务器的版本相关错误进行比较。当 deployment 及其版本能够按预期移除,或命令能够清楚地报告实际限制时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

bug
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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/server.go:1208\ngo.temporal.io/api/workflowservice/v1._WorkflowService_DeleteWorkerDeployment_Handler\n\t/home/runner/go/pkg/mod/go.temporal.io/[email protected]/workflowservice/v1/service_grpc.pb.go:3449\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1405\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1815\ngoogle.golang.org/grpc.(*Server).serveStreams.func2.1\n\t/home/runner/go/pkg/mod/google.golang.org/[email protected]/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
主要语言
Go
星标
390
派生
123
平均合并
2 天 9 小时
30 天内合并 PR
13

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

temporalio/cli 的其他 Issue

查看 temporalio/cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。