Skip to content

Releases: cloudwego/kitex

v0.6.0

13 Jun 12:39
10348cc
Compare
Choose a tag to compare

Feature:

  • [#923] feat(grpc): grpc client set header and trailer to context by default and provide api to get header from ctx
  • [#891] feat: support to service-inline rpc client and server, which can transfer the rpc call as func call. The feature needs to be used with the generation tool
  • [#946] feat: default server handler support executing Read function by trans pipeline
  • [#936] feat(config): add config items for retry/cb/rcptimeout/limiter
  • [#924] [#939] feat(code_gen): support generating deepcopy apis
  • [#926] feat: support thrift reflection info registry
  • [#897] feat: support loop_service in custom template

Optimize:

  • [#961] optimize(tool): optimize kitex tool tpl with -use param
  • [#966] optimize(ttheader): add type check for headerFlags of TTheader
  • [#919] optimize: replace go func with GoFunc to avoid panic
  • [#960] optimize: make stats package public to reuse it in expanded repo
  • [#955] optimize: remove redundant onRead error log in gonet transerver
  • [#954] optimize: dont return error when transHandler not implement graceful shutdown
  • [#941] optimize(callopt): optimize the debug info of callopt to reduce the possibility of slice grow

Fix:

  • [#963] fix(generic): generic-map writeInt8 fails on byte
  • [#901] fix(mux): mux connection asynccallback dont create new goroutine and server wait all crrst packets recevied by client
  • [#921] fix(loadbalance): fix consisthash byte[] length
  • [#922] fix(mux): fix the problem that output unreasonable error when exit if enable mux and use Kitex Protobuf
  • [#927] fix(connpool): long connection pool reports reuse success using reporter

Refactor:

  • [#958] refactor(errorHandler): refactor the definition of error handler to get more information to handle error
  • [#943] refactor(client): refactor client.Call to improve readability
  • [#560] refactor: refactor server detection trans handler to support custom registration

Tests:

  • [#900] test(generic): add thrift reflection (using dynamicgo) generic call example

Chore:

  • [#976] chore: upgrade netpoll to v0.4.0 and thriftgo to v0.2.11
  • [#956] chore: update configmanager version to v0.2.0
  • [#948] chore: format with goimports -local github.com/cloudwego/kitex

Thanks a lot to those community contributors who submit some pull requests for this version:
@my-vegetable-has-exploded

v0.5.2

13 Apr 13:18
e95eee3
Compare
Choose a tag to compare

Feature:

[#887] feat(retry): add configuration to support disable timeout retry when do failure retry, which is for the non-idempotent request
[#881] feat(tool): support codegen in windows
[#880] feat(rpctimeout): fine grained rpc timeout error code
[#872] feat(thrift): support unknown fields in fast codec

Optimize:

[#884] optimize(rpcinfo): RPCInfo.To().Tag() use instance tag instead of remoteinfo tag firstly

Fix:

[#896] fix(remoteinfo): fix the race problem caused by non-deepcopy CopyFrom of remoteinfo
[#892] fix(grpc): comment error log for the error of ReadFrame.
[#889] fix(retry): result retry doesn’t work after failure retry policy is modified dynamically
[#866] fix(grpc): no need to set context return by sendMsg/recvMsg to the context of stream

Chore:

[#898] chore: modify template for PR to check the modification of user doc
[#854] style(nphttp2): keep struct receiver name same

v0.5.1

17 Mar 03:14
9c76b55
Compare
Choose a tag to compare

Fix:

  • [#862] fix(loadbalance): ensure Next return non-nil when idx large than vtarget

Optimize:

  • [#868] optimize(grpc): do not return error in handleStreams of grpc server to avoid error log when connection is closed normally

Chore:

  • [#863] chore: add go-1.20 compatibility test

v0.5.0

08 Mar 09:51
1f307f2
Compare
Choose a tag to compare

Feature:

  • [#840] feat(fallback): support fallback ability for kitex client-side, usage guide refer to Fallback
  • [#841] feat(tool): add GetResult() and GetFirstArgument() methods for service params of protobuf
  • [#791] feat(tool): merge two ways of passing extensions, to support two ways at sametime
  • [#797] feat(loadbalance): use smooth weighted round robin algo as default Loadbalance policy
  • [#760] feat(grpc): support TLS config in kitex grpc client
  • [#781] feat(tool): supports custom templates
  • [#783] feat(ttheader): add encode logic for gdpr token in TransInfo
  • [#775] feat(tool): support custom generate path
  • [#687] feat(tool): add protoc plugin flag

Optimize:

  • [#750] optimize(generic): generic call write zero value for required and default fields to meet the specification of apache thrift and keep consistent with normal thrift encode of Kitex.
  • [#739] optimize(generic): modify the url routing to align with Hertz for HTTP generic call
  • [#752] optimize(ttheader): attach part of ttheader binary into error when readKVInfo failed, which is useful for troubleshooting
  • [#821] optimize(config): add DeepCopy() & Equals() to circuitbreaker.CBConfig and retry.Policy
  • [#827] optimize: revise the remoteInfo of retry call, using the remoteInfo of the RPCCall that returns
  • [#762] optimize(tool): add go mod auto replace to thrift 0.13 in thrift mode
  • [#755] optimize: improve client error msg when ctx cancel or timeout
  • [#756] optimize: use sync.Cond as the profiler event trigger
  • [#753] optimize: add recover for client's Close

Fix

  • [#734] fix(retry): fix the panic problem caused by concurrent read and write of rpcinfo under backup retry
  • [#837 #842] fix(metahandler): adjust MetainfoHandler to the top of the MetaHandlers array to ensure that the logic of custom MetaHandlers that depends on MetainfoHandler works
  • [#812] fix: use detectionHandler to perform protocol detection in windows environment to support gRPC
  • [#851] fix: upgrade frugal to v0.1.6 for missing stop field
  • [#845] fix: fix the problem that RPCStat report status as success when biz handler return err
  • [#822] fix(loadbalance): don't share balancer factory when loadbalance is defined by user
  • [#732] fix(mux): mux server waits for shardqueue close before shutdown
  • [#795] fix(grpc): zero first byte of grpc data frame, which could be random data from mcache
  • [#668] fix: fix race problem in queue.go/queue @dugenkui03
  • [#743] fix: use sharedTicker for long conn pool to prevent goroutine numbers increase as the number of client increases
  • [#799] fix(util): should return when get at least one GOPATH @StellarisW
  • [#807] fix(codec): fix fastpb nil ptr when struct fields are all default values
  • [#794] fix(tool): fix fastpb codegen by updating dependency
  • [#787] fix(tool): the import did not use the new method to render when template append content
  • [#785] fix(tool): remove useless combine service files
  • [#754] fix: fix the usage of metainfo in grpc scene

Refactor

  • [#814 #843] refactor(trans): return error in onRead of defaultServerHandler and close conn in outer method
  • [#816] refactor(utils): add utils.GetEnvLogDir and deprecate utils.GetLogDir

Tests

  • [#839 #693] test: import mockey repo and add usage demo of mockey unit test
  • [#806] test(transmeta):add some test cases for tansmeta package

Docs

Chore

  • [#817, #832] chore: upgrade dependency lib to adapt go 1.20
  • [#772] chore: modify kitex gen code meta file name from kitex.yaml to kitex_info.yaml

Dependency Change:


Thanks a lot to those community contributors who submit some pull requests for this version:
@dugenkui03 @StellarisW @fuergaosi233

v0.4.4

13 Dec 11:15
dd39b82
Compare
Choose a tag to compare

Feature:

  • [#735] feat: add code ref generator for kitex cmd
  • [#730] feat: use frugal as default codec when available (reverted)
  • [#700] feat(tool): generating frugal tag as default
  • [#708] feat(tool): add an argument for thriftgo plugin time limit

Optimize:

  • [#744] optimize(thrift): Add the field info to error messages to make it easier for users to troubleshoot
  • [#720] optimize(metainfo): ignore whether protocol supports meta data to support the use of backward values in pure thrift protocol
  • [#740] optimize(option): remove the restrict that don't allow set service basic info multi-times
  • [#722] optimize: add kitex.yaml to make sure the service is kitex server and align with hz
  • [#711] optimize: prevent users from misusing WithBoundHandler to add the same bound handlers
  • [#726] optimize: Add a warn log when the BoundHandler already exists

Refactor:

  • [#713] refactor: remove writeDirect from fastCodec
  • [#723] refactor: add ForceSetTag method for RemoteInfo, which is used to reset Tag in special scenario

Fix:

  • [#742] fix: close pre-configured connpool in the client option when forward proxy configure the connpool
  • [#728] fix(generic): Fix js_conv value mapping bug and type conversion problem in HTTP generic call
  • [#738] fix: keep client alive during call
  • [#737] fix: revise the order of lock to avoid data race in retry container Init
  • [#718] fix(generic): Fix the problem that causes panic when an elem of map/slice of a generic request is nil
  • [#724] fix: call closeCallback when client init failed
  • [#712] fix(tool): fix kitex cmd remote repo pulling logic
  • [#710] fix(tool): fastpb add import guard to prevent possible compiling error
  • [#707] fix(connpool): check the deadline of connection in IsActive if the sub-conn does not implement IsActive interface

Chore:

  • [#745] Revert "feat: use frugal as default codec when available"
  • [#714] chore: reformat runGit function
  • [#703] chore: upgrade netpoll to v0.3.1
  • [#706] ci: remove scenario-test job and modify go version of unit-scenario-test job to 1.17
  • [#704] chore: gcflags of go test command setting error causes unit tests not triggered and supplement integration test coverage

v0.4.3

02 Nov 09:15
0f18091
Compare
Choose a tag to compare

Feature:

[#691] feat(client): add context middleware which is used for adding request-level middlewares
[#649] feat(connpool): new long connection pool with minIdle config and idle connections cleanup
[#672] feat(grpc): add grpc metadata api
[#527] feat(profiler): profiler for rpc request which can be used for cost statistics
[#613] feat(exception): support customized biz error which can distinguish with RPC error
[#670] feat(exception): support error format
[#678] feat(tool): add git and record param for cmd
[#662] feat(tool): support frugal precompile (pretouch) when new client or server
[#657] feat(tool): support template extension

Optimize:

[#638] optimize(generic): httppb generic support map/list elem type as struct
[#690] optimize(meta): remove error logic for adding default metaHandler in #503
[#641] optimize(tool): add warnings comments for oneway methods

Fix:

[#611] fix(client): fix resource leaks caused by Finalizer not being triggered in the scenario where clients are created frequently
[#698] fix(connpool): adjust globalIdle based on the number of connections decreased during the Get.
[#636] fix(connpool): CloseCallback and statistical reporting of connection pool are invalid when the connection pool is reset in ForwardProxy
[#647] fix(grpc): update grpc connection window size when initial and synchronize grpc pr #5459
[#639] fix(generic): marshalling list in generic and enabling forJSON reader option for MapThriftGeneric
[#655] fix(generic): numeric constant parsing fails when used as generic default value
[#654] fix(frugal): fix compilation error when using lower go version
[#682] fix(profiler): profiler stop pprof profile
[#637] fix(tool): fix imports in handler.go template
[#630] fix(tool): remove redundant kitex comments for file that do not declare an interface
[#627] fix(tool): fix import missing when having different alias for the same path

Docs:

[#656] docs: remove wrong message in CONTRIBUTING.md
[#683] docs(kerrors): fix kerrors WithCauseAndExtraMsg method comment
[#623],[#625] docs(pr): update the template of pull request

Refactor:

[#651] refactor(server): server handler read/write interface return new context

Test & CI:

[#646] test: fix ut failure caused by InitRPCInfoFunc not setting rpcinfo
[#680] test: fix retry test race
[#661] test: make wpool tests more stable
[#643] test: add test for detection server handler
[#632] test: replace handwritten mock classes with gomock auto-generated classes
[#697] ci: fixed skywalking-eyes version
[#652] ci: delete repeated tests to reduce unit tests cost times
[#588] ci: support codecov

v0.4.2

30 Aug 10:18
5f0f79e
Compare
Choose a tag to compare

Hotfix:

[#626] hotfix: revert golang 1.16 api for compatibility with lower go version.

v0.4.1

29 Aug 09:57
995948d
Compare
Choose a tag to compare

Bugfix:

[#620] fix: fix panic when connections over limit
[#606] fix: set message payload size when encode

v0.4.0

26 Aug 14:22
4a7219a
Compare
Choose a tag to compare

Feature:

[#571] feat(protobuf): integrate fastpb into kitex, refer to doc.
[#592] feat(generic): add default value defined in thrift idl for HTTP/Map/JSON generic call.
[#600] feat(thrift): support no codec gen-code when use frugal.
[#607, #610] feat(proxyless): add option for xDS extention. Support traffic route, timeout config and service discovery based on xDS.
[#541] feat(trans): Add the go net extension to the transport layer, and chooses it as the transmission mode by default in Windows OS.
[#540] feat(retry): support retry with specified error or response and add retry option for setup method retry policy.
[#533] feat(generic): js_conv annotation of generic call supports map type conversion.

Optimize/Perf:

[#522, #538, #605] perf(grpc): optimize performance for grpc protocol.
[#590] optimize(tool): guess IDL type from file extension.
[#559] optimize(timeout): use wrap func to check timeout err in timeout middleware which can ignore logs customized timeout err.
[#581] optimize(tool): kitex tool usage add cmd example.

Bugfix:

[#564] fix(oneway): discard oneway conn after sending complete, or subsequent requests that send to the same connection may get blocked until the oneway request gets processed by the server.
[#577, #584, #602] fix(rpcinfo): fix rpcinfo reuse problem in longconn scene.
[#578] fix(longpool): fix long pool dump panic.
[#583] fix(tool): fix misusing of package name in protobuf generated code.
[#587] fix(tool): skip proto files with external import paths when generates code.
[#594] fix(generic): support the tag format of the escape double quotes in single quotes to be compatible with the logic of the old version.
[#595] fix(thrift): fix nil union panic in BLength.
[#589, #596] fix(frugal): fix frugal build tag.

Refactor:

[#566] refactor(metainfo): remove noused metakeys of HTTP2 Header.
[#593] refactor(trans): support specify Listener for server by option WithListener, the priority is higher than WithServiceAddr.
[#582] refactor(tool): use templates by embedding and export APIs for external usage for kitex tool.

Test:

[#579] test: add ut for long pool dump function
[#608] test: fix data race in TestClientConnDecoupledFromApplicationRead
[#609] test: fix gonet ut avoid testing port conflicts.
[#480] test: add unit test for client package

Chore:

[#558] ci: fix setup-python github action
[#487] ci: workflow add golangci-lint
[#580] chore: fix the typos in remote module about go net
[#601] chore: fixed some typos and replaced some defunct functions.
[#604] chore: upgrade fastpb to v0.0.2
[#603] chore: upgrade frugal to v0.1.2

Dependency Change:

github.com/cloudwego/frugal v0.1.1 -> v0.1.3
github.com/cloudwego/netpoll v0.2.5 -> v0.2.6
github.com/cloudwego/thriftgo v0.1.2 -> v0.2.0
google.golang.org/protobuf v1.26.0 -> v1.28.0
github.com/choleraehyq/pid v0.0.13 -> v0.0.15
new imported:
github.com/cloudwego/fastpb v0.0.2
github.com/jhump/protoreflect v1.8.2


Thanks a lot to those community contributors who submit some pull requests for this version:
@baiyutang @L2ncE @authorixy

v0.3.4

15 Jul 05:46
c8b4cd7
Compare
Choose a tag to compare

Bugfix

[#554] fix: revert "optimize(rpcinfo): RPCInfo.To().Tag() use instance tag instead of remoteinfo tag firstly"