go-kratos/kratos
 Watch   
 Star   
 Fork   
3 days ago
kratos

v3.0.0

Breaking Changes

  • break: update kratos modules to v3 (#3822)

New Features

  • feat(errors): add standard library errors wrappers (#3844)
  • feat(transport/http): add read/write deadline control to ServerStream (#3843)
  • feat(protoc-gen-go-http): support google.api.HttpBody response (#3839)
  • feat(config): add generic config Get support (#3778)
  • feat(middleware/auth/jwt): add WithParserOptions to allow configuring… (#3803)
  • feat: support pre condition failed code mapping (#3795)
  • feat(cmd): add --repo flag to kratos new command (#3789)
  • feat(errors): add TooManyRequests error type (#3787)
  • feat(transport/http): support redirect errors in default error encoder (#3783)
  • feat(validate): add custom validator support and improve flexibility (#3780)

Bug Fixes

  • fix(transport/http): bind named body field for websocket client streaming (#3837)
  • fix(transport/http): clone transport before applying TLSClientConfig to avoid mutating http.DefaultTransport (#3808)
  • fix: JSON parsing error during hot reload caused by duplicate file write events
  • fix(config/apollo): prevent panic on nil NewValue in watcher onChange (#3806)
  • fix(metrics): remove redundant _bucket suffix from default histogram name (#3794)
  • fix: trim service suffix of service name (#3785)
  • fix(cmd): assign filepath.Join result to base in findCMD loop (#3798)
  • fix(middleware/metrics): remove redundant _bucket suffix from default histogram names (#3797)
  • fix(contrib/registry/discovery): replace context.TODO() with context.Background() (#3786)
  • fix(contrib/registry/eureka): use shared http.Transport (#3772)

Chores

  • chore(cmd): update dependencies and enhance project creation (#3779)

Others

  • contrib/registry/nacos: upgrade nacos-sdk-go from v1 to v2 (#3804)
  • refactor(contrib/registry/discovery): remove dead code (#3801)
  • Acc/reg (#3800)
  • build(deps): bump actions/cache from 4 to 5 (#3788)
  • refactor(contrib/opensergo): replace golang.org/x/net/context with standard context (#3782)
  • perf(encoding/form): replace fmt.Sprintf with string concatenation for map key encoding (#3777)

New Contributors

Full Changelog: https://github.com/go-kratos/kratos/compare/v2.9.2...v3.0.0

2025-12-06 00:02:34
kratos

v2.9.2

Dependencies

  • deps: upgrade kratos version to v2.9.2 (#3773)

New Features

  • feat(ci): implement comment-check in workflows. (#3426)
  • feat(consul): support custom tags for service registration (#3707)

Bug Fixes

  • fix(metadata): ensure Clone creates deep copy of slices (#3767)
  • fix(http): ignored errors in error message (#3751)
  • fix: google.protobuf.Empty produces invalid type*pb.google_protobuf_Empty(#3715) (#3716)
  • fix(transport/grpc): ClientOption cannot initialize StreamMiddleware(#3697) (#3729)

Chores

  • chore(ci): update GitHub Actions dependencies (#3746)
  • chore(go.mod): update Go version to 1.22 across all modules (#3745)
  • chore(all): normalize whitespace (#3713)

Others

  • build(deps): bump peter-evans/create-or-update-comment (#3761)

  • docs: correct official documentation URLs (#3768)

  • perf(config): move placeholder regex to package-level variable (#3769)

  • perf(encoding/form): optimize parseURLQueryMapKey with memory-efficient implementation (#3770)

  • docs: improve some comments (#3766)

  • build(deps): bump actions/checkout from 4 to 6 (#3762)

  • build(deps): bump peter-evans/find-comment from 3.1.0 to 4.0.0 (#3760)

  • refactor(transport/http): improve compatibility for 'RequestFromServerContext' (#3749)

  • ci: add missing fi in comment-check.yml (#3753)

  • refactor: use math/rand/v2 instead of math/rand (#3752)

  • Revert "支持nacos v2 (#3493)" (#3747)

  • 支持nacos v2 (#3493)

  • style(contrib/registry/kubernetes): simplify namespace empty check in NewRegistry (#3665)

  • perf(log): optimize key-value pair processing in Filter.Log (#3664)

  • perf(selector/wrr): optimize map initialization and simplify node comparison (#3738)

  • build(all): remove unused compatibility files and legacy build tags (#3735)

  • ci: add Go 1.25 support (#3736)

  • test(selector/random): update TestWrr to use more reasonable statistical bounds (#3737)

  • build(deps): bump github/codeql-action from 3 to 4 (#3744)

New Contributors

Full Changelog: https://github.com/go-kratos/kratos/compare/v2.9.1...v2.9.2

2025-09-12 18:43:42
kratos

v2.9.1

Dependencies

  • deps: retract v2.9.0 (#3723)

Bug Fixes

  • fix(transport/http): resolve breaking change with ResponseTransporter interface (#3721)

Others

  • Revert "perf(transport/http): optimize URL construction with url.URL for bett…" (#3722)

New Contributors

Full Changelog: https://github.com/go-kratos/kratos/compare/v2.9.0...v2.9.1

2025-09-10 20:42:01
kratos

v2.9.0

Dependencies

  • deps(middleware): upgrade protovalidate to resolve compatibility issue (#3706)

New Features

  • feat(protoc-gen-go-http): mark deprecated methods in generated code (#3711)
  • feat: add MCP transport (#3646)

Bug Fixes

  • fix(encoding): extract all form fields even if some unsupported (#3694)
  • fix meta variable (#3712)
  • fix: honor shutdown timeout when provided context already canceled (#3695)
  • fix stale entries before the each pick operation (#3690)
  • fix: replace strconv.Itoa with strconv.FormatInt for int64 handling (#3667)
  • fix: solve have syntax error when execute make command. (#3682)
  • fix(internal/host): Extract optimizes the return of the minimum index IP (#3421)
  • fix: Fixed zookeeper watcher exiting the loop under exceptional conditions, causing service discovery to terminate (#3517)

Chores

  • chore: add deepwiki badge (#3701)

Others

  • perf(transport/http): optimize URL construction with url.URL for better performance (#3678)
  • perf(transport/http/binding): optimize EncodeURL performance for paths without placeholders (#3679)
  • refactor(all): replace atomic functions with atomic types (#3699)
  • contrib/register/nacos: refactor to use maps.Clone (#3703)
  • *: use net.JoinHostPort to improve IPv6 compatible (#3675)
  • perf(config/env): use strings.LastIndexByte instead of strings.LastIndex (#3660)
  • Add trendshift badge (#3655)
  • perf(metadata): simplify Metadata.Add by avoiding redundant strings.ToLower call (#3671)
  • Mcp options (#3652)
  • Revert "refactor: replace repeated error reasons with constants (#3612)" (#3651)
  • perf(config/env): use strings.Cut to optimize env load method (#3645)
  • add mcp middleware (#3649)
  • refactor(contrib/registry/etcd): use Namespace Name and ID as the unique keys (#3594)
  • go mod tidy (#3648)
  • build(deps): bump golang.org/x/net from 0.23.0 to 0.33.0 (#3527)
  • github: Remove submodule dependencies in Dependabot. (#3643)
  • perf(encoding/form): optimize camelCase and snakeCase conversion (#3592)
  • refactor: extract key for reuse and maintainability (#3602)

New Contributors

Full Changelog: https://github.com/go-kratos/kratos/compare/v2.8.4...v2.9.0

2025-03-08 00:19:52
kratos

v2.8.4

New Features

  • feat: disable grpc reflection configuration
  • feature(middleware/validate): migrate from PGV to protovalidate, since PGV has entered in maintenance (#3498)

Bug Fixes

  • fix: Improve server stop handling with graceful shutdowns (#3525)
  • fix(registry/consul): fix concurrency issues and improve performance (#3511)

Chores

  • chore: replace interface{} with any (#3557)

Others

  • optimize loops, when discover load is nil. (#3507)

New Contributors

Full Changelog: https://github.com/go-kratos/kratos/compare/v2.8.3...v2.8.4

2024-12-19 17:33:06
kratos

v2.8.3

New Features

  • feat(log): add Logger() method for Helper (#3443)

Bug Fixes

  • fix(registry): add timeout validation (#3492)
  • fix k8s headless service miss namespace (#3407)
  • fix: Return inner Logger from GetLogger for log.WithContext reuse (#3455)
  • fix: various typos (#3454)

Others

  • build(deps): bump golang.org/x/net in /contrib/opensergo (#3434)
  • build(deps): bump actions/setup-go from 5.0.2 to 5.1.0 (#3450)

New Contributors

Full Changelog: https://github.com/go-kratos/kratos/compare/v2.8.2...v2.8.3

2024-10-30 10:44:26
kratos

v2.8.2

New Features

  • feat: create build Group in changelog generate. (#3448)

Bug Fixes

  • fix: unit test Recycle watch resolver tick goroutine (#3449)
  • fix: resolve the issue of metrics and logging code default to zero (#3447)

Others

  • build(deps): bump golang.org/x/sync in /contrib/registry/zookeeper (#3387)

Full Changelog: https://github.com/go-kratos/kratos/compare/v2.8.1...v2.8.2

2024-10-14 20:46:17
kratos

v2.8.1

New Features

  • feat(middleware/metrics): make DefaultSecondsHistogram simply (#3385)
  • feat: adding stream interceptor for logging middleware (#3359)
  • feat(contrib/log/zap): If disable this level of logging entirely, avoid additional overhead (#3357)
  • feat(resolver/discovery): expose create watcher timeout error (#3392)

Bug Fixes

  • fix: fix errors reported by Lint CI. (#3435)
  • fix: add timeout configuration in grpc dial function (#3365)
  • fix: when entering idle mode, the old resolve-related resources have not been completely processed, and an exception occurs when exiting idle mode immediately. (#3402)
  • fix(registry/polaris): fix concurrent map iteration and map write #3361 (#3386)
  • fix: fixed typo (#3395)
  • fix: filter redundant endpoints invalid (#3373)

Chores

  • chore: upgrade golangci-lint version to v1.60.3 and fix lint (#3414)
  • chore: remove non-existent test methods (#2770)
  • chore: replace the DisableDebugLog method, which is marked as Deprecated, with the PrintDebugLog method in the discovery test (#3364)

Others

  • faet: add buf config for protoc-gen-go-errors (#3403)
  • perf: optimize the http.ContentType method (#3363)
  • build(deps): bump github/codeql-action from 2 to 3 (#3119)
  • build(deps): bump google.golang.org/protobuf in /cmd/protoc-gen-go-http (#3237)
  • build(deps): bump golang.org/x/net in /contrib/errortracker/sentry (#3288)
  • build(deps): bump golang.org/x/net in /contrib/registry/etcd (#3289)
  • build(deps): bump golang.org/x/net in /contrib/config/kubernetes (#3291)
  • build(deps): bump golang.org/x/net in /contrib/registry/kubernetes (#3290)
  • build(deps): bump golang.org/x/net in /contrib/log/aliyun (#3292)
  • build(deps): bump golang.org/x/net in /contrib/registry/polaris (#3294)
  • build(deps): bump actions/setup-go from 5.0.1 to 5.0.2 (#3362)

New Contributors

Full Changelog: https://github.com/go-kratos/kratos/compare/v2.8.0...v2.8.1

2024-07-22 20:00:02
kratos

v2.8.0

Breaking Changes

  • break(metrics): refactor kratos metrics with otel metrics (#3256)

New Features

  • feat: parsing config input and convert to match the type (#3306)

Bug Fixes

  • fix(contrib/registry/nacos): Abnormal blocking of the Subscribe and Next methods. (#3320)
  • fix(contrib/opensergo): incorrect conversion between integer types (#3309)
  • fix(contrib/polaris): incorrect conversion between integer types (#3300)
  • fix: com patile both map[kratos] and map.kratos for a map type in the query parameters (#3284)

Chores

  • chore(middleware/metrics): if requests and seconds are nil, return directly (#3298)

Others

  • chroe: chore update (#3367)
  • build(deps): bump golang.org/x/net from 0.19.0 to 0.23.0 (#3295)
  • build(deps): bump golang.org/x/net in /contrib/registry/servicecomb (#3285)
  • build(deps): bump golang.org/x/net in /contrib/config/etcd (#3293)
  • adds Set-Cookie method to the HTTP transport. (#3353)
  • build(deps): bump actions/setup-go from 5.0.0 to 5.0.1 (#3315)
  • build(deps): bump golangci/golangci-lint-action from 5 to 6 (#3340)
  • The issue that the response header is not assigned a value is fixed (#3327)
  • build(deps): bump golangci/golangci-lint-action from 4 to 5 (#3305)
  • faat(encoding/form): allow change the default form encoder and decoder tag name (#3328)
  • build(deps): bump github.com/aliyun/aliyun-log-go-sdk (#3332)
  • build(deps): bump golang.org/x/net in /contrib/polaris (#3296)
  • build(deps): bump Yikun/hub-mirror-action from 1.3 to 1.4 (#3307)
  • build(deps): bump google.golang.org/protobuf (#3238)
  • build(deps): bump github.com/aliyun/aliyun-log-go-sdk (#3270)
  • build(deps): bump golang.org/x/net in /contrib/opensergo (#3277)
  • build(deps): bump golang.org/x/sync in /contrib/registry/zookeeper (#3274)
  • dep: change library name of mergo #3149 (#3297)

New Contributors

Full Changelog: https://github.com/go-kratos/kratos/compare/v2.7.3...v2.8.0

2024-03-22 23:50:18
kratos

v2.7.3

New Features

  • feat(transport/http): add unwrap method for returning underlying response writer. #3253 (#3265)
  • feat: use writer directly in stdLogger. (#3121)
  • feat(log): Prevent log.Helper sprintf from running early #3209 (#3221)
  • feat(middleware): adding sentry as errortracker (#3122)
  • feat: add server option for NotFoundHandler and MethodNotAllowedHandler (#3131)
  • feat: improve node alg (#3015)

Bug Fixes

  • fix(encoding/form): Timestamp use local time and fix test wrong mock time zone (#3257)
  • fix(encoding/form): optimize EncodeField and add test cases (#3234)
  • fix: When grpc ends idle mode, it needs to continue to obtain the latest instance of the service (#3162)
  • fix: etcd registry lifecycle (#3180)
  • fix: logging middleware caller issue #3133 (#3134)
  • fix polaris registry bug: nodes is empty at startup (#3160)
  • fix: remove duplicate test codes. (#3187)
  • fix: use .MapKey to get key's FieldDescriptor (#3196)
  • fix(transport/http): no need to call EncodeURL twice (#3218)
  • fix(protoc-gen-go-http): return nil if err == nil。 (#3188)
  • fix: zap log print out multiple msg (#3171)
  • fix: test failed on other timezone.(#3181) (#3183)
  • fix: clear err after app stop err handling (#3146)
  • fix: fix consul heartbeat 404 error (#3147)
  • fix(encoding/form): time with the location set to local time (#2885)

Others

  • nacos stop cannot cancel subscription (#3173)
  • build(deps): bump golang.org/x/sync in /contrib/registry/zookeeper (#3150)
  • build(deps): bump github.com/prometheus/common (#3154)
  • build(deps): bump golang.org/x/net in /contrib/opensergo (#3155)
  • build(deps): bump actions/cache from 3 to 4 (#3158)
  • build(deps): bump golangci/golangci-lint-action from 3 to 4 (#3197)
  • build(lint): upgrade golangci/golangci-lint-action (#3235)
  • build(go): Add go version v1.22.x (#3236)
  • build(deps): bump github.com/go-resty/resty/v2 (#3151)

New Contributors

Full Changelog: https://github.com/go-kratos/kratos/compare/v2.7.2...v2.7.3