Skip to content

v0.14.0

Compare
Choose a tag to compare
@TimShi TimShi released this 25 Apr 18:19
· 112 commits to main since this release
5e5bd40

This Release Includes Breaking Changes

This release includes breaking changes. The changes are introduced in order to extend the framework to add more implementation options for service discovery and distributed lock. In addition, support for go-kit is dropped.

What's Changed

New Features

  • Consul become an optional package. When initialized (consul.Use()), Consul is registered with appconfig as a source of application properties
  • Vault become an optional package. When initialized (vault.Use()), Vault is registered with appconfig as a source of application properties.
  • Added dnssd for DNS SRV based service lookup. dnssd also support static service discovery as "fallback"
  • Added Redis based distributed lock implementation

Breaking Changes

  • Breaking change in discovery package:
    • consul backed service discovery is moved to a separate package. To use it, consulsd (formally known as discoveryinit) package need to be initialized with consulsd.Use(). consul.Use() is also a prerequisite for using Consul based service discovery
    • Properties for consulsd is relocated to to cloud.discovery.consul from cloud.consul.discovery
  • Breaking change in integrate/httpclient package:
    • httpclient.Client.WithService(...) is changed to take optional SDOptions. Options includes default HTTP scheme and context-path, SD error handling and SD selector
    • The client now supports retry back-off period and custom retry logic
    • go-kit interfaces are removed
  • Breaking change in integrate/security package:
    • Property integrate.security.service-name moved to integrate.security.endpoints.service-name
    • Added properties integrate.security.endpoints.scheme and integrate.security.endpoints.context-path
  • Breaking change due to dropping usage and compatibility support of go-kit:
    • log.Logger no longer implements go-kit's Logger interface.
    • discovery.Instancer concrete implementations no longer implement go-kit's sd.Instancer interface.
    • web package interfaces re-organized to remove usage of go-kit's abstraction and server implementation.
  • Breaking change due to dsync package refactoring:
    • dsync package is refactored to three packages dsync, consuldsync and redisdsync
    • dsync.Use() is removed, consuldsync.Use() or redisdsync.Use() should be used instead.
    • Removed web.Registrar.RegisterWithLifecycle()

Bug Fixes

  • Fixed: When using go 1.21 or later, lanai-cli's init command would fail if the service's go.mod file contains a replace directive that pointed to a none-existent location.
  • Fixed: a bug in make init-cli when go-lanai is not replaced by a local copy in the go.mod file.
  • Fixed: a typo causing data packages fail to build when CGO_ENABLED=0
  • Fixed: a bug in errorutils where errorutils.CodedError does not correctly implement errorutils.NestedError
  • Fixed: a bug in bootstrap where bootstrap.AddOptions() was actually adding options to bootstrap.Module.PriorityOptions instead of bootstrap.Module.Options
  • Fixed: a bug where httpclient package's error was not well formatted (#408).

Others

  • Updated make files in examples to match the latest make file template.
  • Updated main README.md and restructured documentation locations.
  • Tracing package refactored to reduce unnecessary indirect dependencies. Instrument implementations are moved to their corresponding feature packages.

Full Changelog: v0.13.0...v0.14.0