Skip to content

Releases: cloudwego/kitex

v0.15.4

26 Dec 08:49
6e03ff3

Choose a tag to compare

v0.15.4

Bug Fixes

Code Generation - DeepCopy for Binary Types (#1902)

  1. Fixed: DeepCopy code generation now correctly handles Thrift binary types that are mapped to Go string types.

This ensures string-typed binary fields are handled with simple value assignment instead of byte slice allocation and copying.

Dependencies

Updated: github.com/cloudwego/gopkg v0.1.6 → v0.1.8 (#1903)

Changes included from gopkg v0.1.7:

  • Optimized thrift span cache with lazy initialization (performance improvement)
  • Fixed protocol handling to ensure data length matches copied bytes for strings and binary data (correctness fix)
  • Added connection state checker for gonet (stability improvement)
  • Resolved file descriptor operator memory leak (memory safety)

Changes included from gopkg v0.1.8:

  • Increased ttheader limit size from 64KB to 256KB
  • Fixed header length overflow issues

Impact: Improves protocol handling correctness, memory safety, and increases header size limits for TTHeader protocol users.

Commits

  • ccdabb2 - fix(tool): DeepCopy assignment failed when map key type is binary (#1902)
  • 3f27dca - chore: update github.com/cloudwego/gopkg from v0.1.6 to v0.1.8 (#1903)
  • 4e64cc3 - chore: release version v0.15.4

v0.15.3

19 Dec 08:33
99b6434

Choose a tag to compare

Highlights

This release includes important bug fixes for TTStream, mixed retry, and rpcinfo handling, along with new features for dynamicgo options and code generation improvements.

Feature

  • Support passing dynamicgo's parsing options via WithDynamicGoOptions for ThriftIDLProvider (#1878)
  • Code generation: Execute custom templates on each service when loop_service is set to true, even without combined service mode (#1893)

Fix

  • Fix kitex tool: Move git clone/checkout before protobuf processing to ensure dependencies are available (#1900)
  • Fix TTStream: Inject K_METHOD into server-side context to provide method name for downstream RPC calls (#1852)
  • Fix TTStream: Send Header Frame when exiting handler directly via CloseSend without sending messages (#1887)
  • Fix mixed retry: Avoid waiting for backoff when the first call is successful (#1879)
  • Fix rpcinfo: Prevent type conversion panic when calling FreezeRPCInfo consecutively (#1888)

Optimization

  • Improve connection failure auto-retry log by adding destination service name for troubleshooting (#1880)
  • Avoid grpc cleanupStream closure capturing Stream objects, reducing memory retention (#1886)

Documentation

  • Fix grammar and clarity issues in README.md (#1896)

Dependency

  • Upgraded github.com/cloudwego/localsession from v0.1.2 to v0.2.1
  • Upgraded github.com/cloudwego/dynamicgo from v0.7.0 to v0.7.1
  • Upgraded github.com/bytedance/sonic from v1.14.1 to v1.14.2

Full Changelog: v0.15.2...v0.15.3

v0.15.2

17 Oct 08:37
6ca038a

Choose a tag to compare

What's Changed

  • ci: add claude github workflows by @jayantxie in #1870
  • ci: manually trigger the pr review workflow to fix the workflow error in the fork repository's PR by @jayantxie in #1874
  • fix(server): support unique method lookup when service name lookup fails by @jayantxie in #1873
  • feat: restore the definition of remote.Message().ProtocolInfo() interface to resolve compatibility issues by @jayantxie in #1876
  • chore: release version v0.15.2 by @jayantxie in #1877

Full Changelog: v0.15.1...v0.15.2

v0.15.1

26 Sep 08:34
b00f132

Choose a tag to compare

What's Changed

  • fix(ttstream): use consistent context of stream in ttstream.RecvMsg and fix nil message error of binary generic by @jayantxie in #1866
  • fix(gRPC): retrieve status or biz error for non-ServerStreaming by @DMwangnima in #1530
  • chore: update version v0.15.1 by @jayantxie in #1867

Full Changelog: v0.15.0...v0.15.1

v0.15.0

23 Sep 09:27
4a7d8e3

Choose a tag to compare

What's Changed

Feature

特性:TTStream 支持上下文取消及详细的取消错误信息

  • feat(generic): support new thrift binary generic call api, server streaming generic call and unknown service or method handler by @jayantxie in #1837 | #1857

特性:支持新的 thrift 二进制泛化调用 api,服务端流式泛化调用和 unknown service or method handler

  • feat(grpc): support dump MaxConcurrentStreams of HTTP2 Client by @DMwangnima in #1820

特性:gRPC 支持导出 HTTP2 客户端的 MaxConcurrentStreams 配置

Fix

修复:浅拷贝 response 以避免数据竞争

  • fix(lbcache): check the existence before new Balancer to prevent leakage by @ppzqh in #1825

修复:负载均衡器缓存中创建新均衡器前检查存在性以防止泄漏

  • fix(generic): descriptor.HTTPRequest.GetParam nil pointer exception by @jayantxie in #1827

修复:描述符 HTTPRequest.GetParam 的空指针异常

修复:泛化写入整数的范围检查

  • fix(rpcinfo): protect bizErr and extra field of ri.Invocation by lock by @jayantxie in #1850

修复:通过锁保护 ri.Invocation 的 bizErr 和 extra 字段

  • fix(timeout): remove timer pool to avoid timer race issue by @jayantxie in #1858

修复:移除计时器池以避免计时器竞争问题

修复:工具中为 Protobuf 禁用 Fast API

  • fix(tool): skip pb code gen for arg -use by @xiaost in #1819

修复:工具中为 -use 参数跳过 PB 代码生成

Optimize

  • optimize(grpc): access metadata.MD without ToLower by @xiaost in #1806

优化:gRPC 访问 metadata.MD 时不转换为小写

  • optimize(ttstream): lazy init cleaning task for ObjectPool to reduce the impact of lots of goroutines caused by creating too many Generic Client by @DMwangnima in #1842

优化:对象池延迟初始化清理任务,减少创建过多泛化客户端导致的大量 goroutine 影响

  • optimize(tool): remove string deepcopy because the string type is read-only in Go by @jayantxie in #1832

优化:移除字符串深拷贝,因为 Go 中字符串类型是只读的

Refactor

重构:移除 TTStream provider 接口

  • refactor(rpcinfo): move service/method info from message to rpcinfo, remove protocol info from message and update min go version to 1.20 by @jayantxie in #1818 | #1855

重构:将服务/方法信息从消息移至 rpcinfo,从消息中移除协议信息,并更新最低 Go 版本至 1.20

  • refactor(server): remove service middleware and SupportedTransportsFunc api by @jayantxie in #1839

重构:移除服务中间件和 SupportedTransportsFunc API

  • refactor(server): remove useless TargetSvcInfo field by @jayantxie in #1840

重构:移除无用的 TargetSvcInfo 字段

Chore

chore:更新 kitex 依赖项以支持 go1.25 和新特性

chore:更新版本至 v0.15.0

chore:修复博客的损坏链接

  • chore: support custom ctx key to pass to downstream in Service-Inline by @Duslia in #1709

特性:在合并编译场景中支持传递自定义上下文 key 到下游

New Contributors

Full Changelog: v0.14.1...v0.15.0

v0.14.1

25 Jun 02:20
a2b6f64

Choose a tag to compare

Optimize

[#1798] optimize(tool): remove apache replace in go.mod because apache thrift is not used anymore

Test

[#1800] test: improve gRPC unit tests stability

Chore

[#1797] chore: upgrade prutal
[#1802] chore: add release scripts
[#1804] chore: update version v0.14.1

Full Changelog: v0.14.0...v0.14.1

v0.14.0

16 Jun 09:07
9f45fc5

Choose a tag to compare

Feature

[#1759] feat(tool): add env for using prutal to marshal
[#1782] feat(ttstream): process MetaFrame and reflect to rpcinfo
[#1777] feat(client): report err when create Stream failed
[#1763] feat: support ttheader streaming generic call
[#1771] feat(tool): add thriftgo patcher extension
[#1755] feat: add generic binary pb for streamx
[#1752] feat(generic): support generic pb binary for streaming

Optimize

[#1788] optimize: go net implementation
[#1786] optimize(tool): remove tool fastpb generation
[#1783] optimize(gRPC): parse PayloadCodec in server side
[#1780] optimize(ttstream): log the error thrown by invoking handler
[#1769] optimize: injection of options in ttstream

Fix

[#1792] fix(gRPC): inject current method name to rpcinfo in server-side to fix FROM_METHOD missing
[#1787] fix(ttstream): metrics missing caused by server-side rpcinfo not set correctly
[#1778] fix: enabling json mode of map generic not work
[#1774] fix(server): trans server conn count race issue
[#1742] fix(generic): align dynamicgo's write base behavior with old generic (only for internal logic)

Refactor

[#1770] refactor: refactor generic streaming

Tests:

[#1793] test: add go1.18 to scenario-test
[#1765] test: remove unnecessary server in json generic test

Docs

[#1794] docs: update CONTRIBUTING.md to change PR base branch to main

Chore

[#1795] chore: update dependency
[#1776] chore: remove testify dependency
[#1757] chore: update prutal to v0.1.1
[#1753] ci: disable codecov annotations

v0.13.1

08 Apr 12:29
7dbbaca

Choose a tag to compare

Fix

[#1748] fix(tool): truncate fastpb files when using prutal
[#1747] fix(gRPC): task of cleaning up canceled streams in http2Client has a probability of deadlocking

v0.12.4

08 Apr 06:05
2a128be

Choose a tag to compare

Hotfix

[#1749] hotfix: task of cleaning up canceled streams in http2Client has a probability of deadlocking

v0.13.0

02 Apr 08:26
1dd7526

Choose a tag to compare

Feature

[#1719] feat: prutal for replacing protoc
[#1736] feat(ttstream): support WithRecvTimeout stream call option
[#1702] feat(gRPC): add grpc client conn dump to help debug the conn and stream status
[#1723] feat(codec/thrift): use fastcodec/frugal if apache codec not available
[#1724] feat: add tail option to support for delayed initialization of some client options

Optimize

[#1728] optimize(apache): remove apache codec gen and set default protocol from buffered to framed
[#1732] optimize(rpcinfo): purify the transport protocol of rpcinfo in a single rpc request
[#1711] optimize(tool): disable set validate and deep equal code gen to simplify kitex_gen
[#1717] optimize(gRPC): return more detailed error when received invalid http2 frame
Fix:
[#1734] fix(ttstream): adjust stream state transition and remove all SetFinalizer to avoid memory leak
[#1735] fix(generic): support both relative and absolute check for idl includes parse to make it compatible with generation tool
[#1725] fix: code gen import issue for streamx mode, stream call judgement bug and set ttheader streaming as default
[#1727] fix(tool): fix tool UseStdLib remains unexcepted lib issue.

Refactor

[#1658] refactor: streamx api to adapt both grpc and ttheader streaming protocol and provide more user-friendly interface
[#1729] refactor(tool): move pb tpl code to sep pkg

Chore

[#1743] chore: update dependencies version
[#1740] chore(generic): deprecate NewThriftContentProvider
[#1741] chore(streamx): remove redundant streamx package
[#1738] ci: fix typos & crate-ci/typos
[#1737] chore: update dependency and change go support to 1.19-1.24
[#1720] Revert "fix(ttstream): pingpong method refers to server interface defined in Kitex generation code when streamx is enabled and there are other streaming methods"