Skip to content

Commit

Permalink
Merge branch 'main' into feature-metrics
Browse files Browse the repository at this point in the history
# Conflicts:
#	go.mod
#	go.sum
  • Loading branch information
chickenlj committed Jul 19, 2023
2 parents 1f4b1c8 + 10336a5 commit 96dcff5
Show file tree
Hide file tree
Showing 45 changed files with 914 additions and 574 deletions.
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,52 @@
# Release Notes
---

## 3.1.0

### Features

- [Implement RemoveConfig API for nacos and zookeeper](https://github.com/apache/dubbo-go/pull/2234)
- [Expose TLSConfig for config api](https://github.com/apache/dubbo-go/pull/2245)
- [Add subscribe any value](https://github.com/apache/dubbo-go/pull/2267)
- [Implement condition routing basic functions and complete related tests](https://github.com/apache/dubbo-go/pull/2299)
- [Implement dynamic routing](https://github.com/apache/dubbo-go/pull/2303)
- [Tag route static config](https://github.com/apache/dubbo-go/pull/2304)
- [Upgrade nacos 2.x](https://github.com/apache/dubbo-go/pull/2316)
- [Print logs of registered providers and consumers](https://github.com/apache/dubbo-go/pull/2320)
- [Add request processing total and request succeed total metrics](https://github.com/apache/dubbo-go/pull/2331)
- [Add some metrics about RT](https://github.com/apache/dubbo-go/pull/2340)
- [Add metrics base api interface](https://github.com/apache/dubbo-go/pull/2350)
- [Sliding window and rt quantile metrics](https://github.com/apache/dubbo-go/pull/2356)

### Bugfixes

- [Fix: Call Java provider occur error use group+version on triple protocol](https://github.com/apache/dubbo-go/pull/2204)
- [Fix: Register instance protocol info to polaris when use Tripe](https://github.com/apache/dubbo-go/pull/2238)
- [Fix: Custom triple server message size](https://github.com/apache/dubbo-go/pull/2246)
- [Fix: Start a new routine when subscribing](https://github.com/apache/dubbo-go/pull/2297)
- [Fix: Upgrade hessian2 to fix java wrapper object decoding bug](https://github.com/apache/dubbo-go/pull/2312)
- [Fix: Polaris service discovery cause nil panic](https://github.com/apache/dubbo-go/pull/2317)
- [Fix: The metadata invoker is destroyed too early](https://github.com/apache/dubbo-go/pull/2322)
- [Fix: Format imports in metrics module](https://github.com/apache/dubbo-go/pull/2323)
- [Fix: Solve config bool field zero value bug by using pointer](https://github.com/apache/dubbo-go/pull/2344)
- [Fix: Disable metrics filter by default instead](https://github.com/apache/dubbo-go/pull/2354)

### Enhancements

- [Add serviceMappingListener for application service discovery](https://github.com/apache/dubbo-go/pull/2205)
- [The argument to ioutil.ReadFile in the config.WithPath method is changed to conf.path](https://github.com/apache/dubbo-go/pull/2209)
- [Upgrade hessian2 to support java wrapper types](https://github.com/apache/dubbo-go/pull/2222)
- [Tablewrite cli show](https://github.com/apache/dubbo-go/pull/2237)
- [Refactor: remove providers and add prefix when use polaris](https://github.com/apache/dubbo-go/pull/2274)
- [Log configuration supports other frameworks and can configure log file generation directory and file size](https://github.com/apache/dubbo-go/issues/2247)
- [Ignore node not exist error message and continue retry](https://github.com/apache/dubbo-go/pull/2307)
- [Refactor: Split metrics module into multiple files](https://github.com/apache/dubbo-go/pull/2310)
- [Ignore zk node already exist when store provider/consumer metadata](https://github.com/apache/dubbo-go/pull/2311)
- [Try update value if node already exists](https://github.com/apache/dubbo-go/pull/2314)
- [Refactor: Use promauto and promhttp](https://github.com/apache/dubbo-go/pull/2333)
- [Chore: Unnecessary use of fmt.Sprintf](https://github.com/apache/dubbo-go/pull/2352)
- [Chore: Pkg imported more than once](https://github.com/apache/dubbo-go/pull/2353)

## 3.0.5

### Bugfixes
Expand Down
2 changes: 2 additions & 0 deletions common/extension/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import (
"github.com/dubbogo/gost/log/logger"

"github.com/pkg/errors"
)

import (
"dubbo.apache.org/dubbo-go/v3/common"
)

Expand Down
7 changes: 6 additions & 1 deletion common/extension/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ import (
"context"
"testing"
"time"
)

import (
"github.com/stretchr/testify/assert"
)

import (
"dubbo.apache.org/dubbo-go/v3/metrics"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/stretchr/testify/assert"
)

func TestGetMetricReporter(t *testing.T) {
Expand Down
3 changes: 3 additions & 0 deletions config/logger_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ package config

import (
"testing"
)

import (
"github.com/dubbogo/gost/log/logger"

"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion config/metric_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
type MetricConfig struct {
Mode string `default:"pull" yaml:"mode" json:"mode,omitempty" property:"mode"` // push or pull,
Namespace string `default:"dubbo" yaml:"namespace" json:"namespace,omitempty" property:"namespace"`
Enable *bool `default:"true" yaml:"enable" json:"enable,omitempty" property:"enable"`
Enable *bool `default:"false" yaml:"enable" json:"enable,omitempty" property:"enable"`
Port string `default:"9090" yaml:"port" json:"port,omitempty" property:"port"`
Path string `default:"/metrics" yaml:"path" json:"path,omitempty" property:"path"`
PushGatewayAddress string `default:"" yaml:"push-gateway-address" json:"push-gateway-address,omitempty" property:"push-gateway-address"`
Expand Down
2 changes: 1 addition & 1 deletion config/reference_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func updateOrCreateMeshURL(rc *ReferenceConfig) {
panic(fmt.Sprintf("Mesh mode enabled, Triple protocol expected but %v protocol found!", rc.Protocol))
}
if rc.ProvidedBy == "" {
panic(fmt.Sprintf("Mesh mode enabled, provided-by should not be empty!"))
panic("Mesh mode enabled, provided-by should not be empty!")
}

podNamespace := getEnv(constant.PodNamespaceEnvKey, constant.DefaultNamespace)
Expand Down
7 changes: 6 additions & 1 deletion config/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ package config

import (
"sync"
)

"dubbo.apache.org/dubbo-go/v3/common"
import (
"github.com/dubbogo/gost/log/logger"
)

import (
"dubbo.apache.org/dubbo-go/v3/common"
)

var (
conServicesLock = sync.Mutex{} // used to guard conServices map.
conServices = map[string]common.RPCService{} // service name -> service
Expand Down
4 changes: 2 additions & 2 deletions config_center/nacos/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
nacosClient "github.com/dubbogo/gost/database/kv/nacos"
"github.com/dubbogo/gost/log/logger"

constant2 "github.com/nacos-group/nacos-sdk-go/common/constant"
"github.com/nacos-group/nacos-sdk-go/vo"
constant2 "github.com/nacos-group/nacos-sdk-go/v2/common/constant"
"github.com/nacos-group/nacos-sdk-go/v2/vo"

perrors "github.com/pkg/errors"
)
Expand Down
4 changes: 2 additions & 2 deletions config_center/nacos/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (

"github.com/golang/mock/gomock"

"github.com/nacos-group/nacos-sdk-go/model"
"github.com/nacos-group/nacos-sdk-go/vo"
"github.com/nacos-group/nacos-sdk-go/v2/model"
"github.com/nacos-group/nacos-sdk-go/v2/vo"
)

import (
Expand Down
4 changes: 2 additions & 2 deletions config_center/nacos/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
import (
"github.com/dubbogo/gost/log/logger"

constant2 "github.com/nacos-group/nacos-sdk-go/common/constant"
"github.com/nacos-group/nacos-sdk-go/vo"
constant2 "github.com/nacos-group/nacos-sdk-go/v2/common/constant"
"github.com/nacos-group/nacos-sdk-go/v2/vo"
)

import (
Expand Down
2 changes: 2 additions & 0 deletions filter/metrics/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ package metrics
import (
"context"
"time"
)

import (
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/filter"
Expand Down
10 changes: 7 additions & 3 deletions filter/metrics/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ import (
"sync"
"testing"
"time"
)

"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/metrics"
import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)

import (
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/metrics"
_ "dubbo.apache.org/dubbo-go/v3/metrics/prometheus"
"dubbo.apache.org/dubbo-go/v3/protocol"
"dubbo.apache.org/dubbo-go/v3/protocol/invocation"
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc
github.com/creasty/defaults v1.5.2
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5
github.com/dubbogo/gost v1.13.2
github.com/dubbogo/gost v1.14.0
github.com/dubbogo/grpc-go v1.42.10
github.com/dubbogo/triple v1.2.2-rc3
github.com/dustin/go-humanize v1.0.1
Expand All @@ -31,22 +31,22 @@ require (
github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645
github.com/hashicorp/vault/sdk v0.7.0
github.com/influxdata/tdigest v0.0.1
github.com/jinzhu/copier v0.3.5
github.com/knadh/koanf v1.5.0
github.com/kr/pretty v0.3.0 // indirect
github.com/magiconair/properties v1.8.7
github.com/magiconair/properties v1.8.1
github.com/mattn/go-colorable v0.1.13
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
github.com/nacos-group/nacos-sdk-go v1.1.4
github.com/nacos-group/nacos-sdk-go/v2 v2.2.2
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852
github.com/opentracing/opentracing-go v1.2.0
github.com/pelletier/go-toml v1.9.3 // indirect
github.com/pkg/errors v0.9.1
github.com/polarismesh/polaris-go v1.3.0
github.com/prometheus/client_golang v1.12.2
github.com/prometheus/common v0.32.1
github.com/prometheus/client_golang v1.13.0
github.com/rogpeppe/go-internal v1.8.0 // indirect
github.com/sirupsen/logrus v1.7.0
github.com/stretchr/testify v1.8.2
Expand Down
Loading

0 comments on commit 96dcff5

Please sign in to comment.