Temporal Blog 09月30日 19:17
Temporal v0.28.0发布:关键更新与迁移指南
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

Temporal v0.28.0版本发布,标志着其更接近稳定生产就绪。此次更新涵盖了自Cadence分叉以来的所有变更,对用户至关重要。主要变化包括从Thrift/TChannel迁移到Protobuf/gRPC,引入TLS加密通信,以及将错误处理机制升级为支持链式传递的自定义服务错误。此外,实体名称进行了重命名,如Decision改为Command,Domain改为Namespace。工作流和活动重试机制也得到了优化,引入了新的超时设置和默认重试选项。CLI工具新增了多项管理命令,SQL Schema简化,查询实现了强一致性。Java和Go SDK体验得到显著提升。Docker部署也更加便捷,支持配置广播地址和MySQL兼容性。

🚀 **技术栈升级与通信加密**:Temporal v0.28.0将通信协议从Thrift/TChannel迁移至Protobuf/gRPC,Go SDK的导入路径更新为go.temporal.io/api。此次升级支持通过TLS对传输中的所有通信进行加密,增强了安全性。错误处理机制也得到了改进,Thrift错误被转换为基于标准gRPC错误码的自定义服务错误,并使用Protobuf的Failure类型进行序列化,支持跨SDK的错误链式传递。所有发送到Temporal的Payload现在都包含headers和data字段,并采用标准的gRPC健康检查服务和Protobuf时间/时长类型。

🏷️ **实体名称标准化与超时重构**:为了提高一致性,多个核心实体名称进行了重命名,例如Decision被改为Command,DecisionTask变为WorkflowTask,Decider变为Workflow,Domain变为Namespace,NamespaceStatus变为NamespaceState,TaskList变为TaskQueue,ArchivalStatus变为ArchivalState。工作流超时设置得到优化,允许Workflow timeouts成为可选,尝试计数从1开始。引入了WorkflowExecutionTimeout来限制工作流总执行时间(包括重试和continue-as-new),并可用于限制定时任务总时长,默认10年。WorkflowRunTimeout(原ExecutionStartToCloseTimeout)默认为WorkflowExecutionTimeout的值。WorkflowTaskTimeout(原DecisionTaskStartToCloseTimeout)默认为10秒。

🔁 **工作流与活动重试机制优化**:工作流重试策略移除了ExpirationInterval,转而使用WorkflowExecutionTimeout来控制重试结束。活动重试现在包含默认的RetryOptions,包括initialInterval为1秒,maximumInterval为100倍initialInterval,backoffCoefficient为2。若要禁用活动重试,需将maximumAttempts设置为1。ScheduleToClose被用于停止活动重试。

🧰 **CLI工具增强与部署便利性**:tctl命令行工具新增了多项强大的管理命令,包括列出命名空间、描述分片、列出和描述任务、列出集群成员以及列出Replication DLQ任务。管理员命令得到改进,支持按Workflow和run IDs过滤任务队列中的任务,命令名称更一致,枚举参数从int改为string,并支持列表命令的表格视图。对于Docker用户,可以通过TEMPORAL_BROADCAST_ADDRESS环境变量配置广播地址,并通过设置MYSQL_TX_ISOLATION_COMPAT=true来支持旧版MySQL。Docker镜像预置了'default'命名空间,简化了入门体验。

✨ **其他重要更新**:SQL Schema设计更加简洁。所有查询均实现强一致性,保证返回实际的当前状态。Java SDK和Go SDK的体验得到显著改善。其他 minor changes 包括显式传递Cassandra地址到Docker依赖、移除docker-compose中的statsd、在配置中暴露Cassandra和串行一致性设置、采用Google api-linter和Buf、支持动态集群IP地址以及保存可重试失败的最后RetryStatus。

Today is an exciting day for us! Temporal is releasing its newest version, v0.28.0, bringing us one step closer to a stable production ready release. We want to thank all of the users who have helped us iterate and move the product forward.

This changelog includes all of the changes since Temporal forked from Cadence, and should help users who are interested in upgrading.

What has changed?#

    Cadence Oct 2019 → Temporal v0.28.0 Alpha: The software version has bumped. __ Thrift/TChannel → Protobuf/gRPC__ ⚡ :
      Server Thrift API → Protobuf API. Go import path is go.temporal.io/api. All communication over the wire can be encrypted via TLS. Note: Support for TLS in tctl and temporal-web is still in-progress. Thrift errors have been converted to custom service errors backed by standard gRPC error codes. Errors are serialized using the Protobuf type Failure. They can now be chained together and passed across different SDKs in different languages. All payloads (Workflow input, Activity input, etc...) sent to Temporal now have headers and data fields. Standard gRPC health service is used for health checks. Standard Protobuf types are used for time and duration. Uber YARPC library has been removed.
    Helm charts ☸️ : Deploy the Temporal server to a Kubernetes Cluster. Entity renames 🏷️ :
      DecisionCommand. DecisionTaskWorkflowTask. DeciderWorkflow. DomainNamespace. NamespaceStatusNamespaceState. TaskListTaskQueue. ArchivalStatusArchivalState.
    Import path rename 📦 : go.uber.org/cadencego.temporal.io/sdk. Workflow timeout refactors ⌛:
      Workflow timeouts are optional. Attempt counters start at 1. Workflow Executions have 3 timeouts available: Renamed:ExecutionStartToCloseTimeoutWorkflowRunTimeout. WorkflowExecutionTimeout is new. It limits the total Workflow execution time including retries and continue-as-new. It also enables limiting the total time of a cron job. The default is 10 years. WorkflowRunTimeout defaults to the value of WorkflowExecutionTimeout. Renamed:DecisionTaskStartToCloseTimeoutWorkflowTaskTimeout. Defaults to 10 seconds.
    Workflow retry refactors 🔁 :
      ExpirationInterval has been removed from RetryPolicy. Instead, WorkflowExecutionTimeout is used to stop retries for Workflows. Attempt counters start at 1.
    Activity retry refactors 🔁 :
      Temporal includes default RetryOptions for Activities.
        initialInterval = 1 second. maximumInterval = 100 * initialInterval. backoffCoefficient = 2.
      To disable Activity retries, configure Activities with RetryOptions that set maximumAttempts to 1. ScheduleToClose is used to stop retries for Activities.
    CLI updates 🧰 :
      New admin commands:
        List namespaces (#463): ./tctl admin namespace list. Describe Shard (#370): ./tctl admin shard describe --shard_id ... / d -sid. List Tasks (#429/#433): ./tctl admin shard list_tasks. Describe Task (#408, #416, #412): ./tctl admin shard describe_task --task_type [timer, replication, transfer] ... / dt. List Cluster memberships(#423): ./tctl admin membership list_db. List Ringpop members (#426): ./tctl admin membership list_gossip. List Replication DLQ Tasks (#456): ./tctl admin kafka list_dlq.
      Admin Command improvements:
        Filter Tasks from TaskQueue based on Workflow and run Ids (#462). Consistent CLI admin command names (#427). Enum parameter flags changed from int to string (#445, #447). Support table-view for list commands (#444).
    Simplified SQL Schemas ➰ : Schemas are now less complex. All Queries are strongly consistent 🔎 : The actual current state is always returned. SDKs 🔌 : Significantly improved experience for both Java SDK and Go SDK. When using Docker 🐳 :
      BroadcastAddress can be configured via the TEMPORAL_BROADCAST_ADDRESS environment variable. MYSQL_TX_ISOLATION_COMPAT environment variable can be set as true in order to support setting up schemas with pre-5.7.20 MySQL installations. Getting started experience has been simplified to have Docker pre baked with 'default' namespace.
    Other minor changes 🔹 :
      Pass 127.0.0.1 explicitly to Cassandra in docker dependency (#540). Remove statsd from docker-compose files (#536). Expose Cassandra and serial consistency settings in configuration (#533). Adopt Google api-linter and Buf (#526). Support dynamic cluster IP addresses in failure scenarios (#495). Save last RetryStatus for retryable failures (#432).

Docker images (use tag 0.28.0)#

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Temporal v0.28.0 Release Notes Changelog Protobuf gRPC TLS Workflow Activity Retry Policy CLI Docker SDK Cadence
相关文章