You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Tsukikage7 (via GitHub)" <gi...@apache.org> on 2026/01/06 03:03:53 UTC
[PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Tsukikage7 opened a new pull request, #3154:
URL: https://github.com/apache/dubbo-go/pull/3154
## What this PR does
This PR implements **Triple protocol generic call** support for dubbo-go, enabling Go clients to invoke Java Dubbo services without pre-generated stubs and vice versa.
### Background
Generic call (泛化调用) is a core feature in Dubbo ecosystem that allows service invocation without IDL/interface definitions. While dubbo-go already supports generic call for the Dubbo protocol, Triple protocol generic call was missing, making it impossible for Go and Java services to interoperate via Triple protocol in non-IDL mode.
### Design Overview
The key challenge is that Java Dubbo Triple protocol uses a specific wire format for non-IDL mode:
```
┌─────────────────────────────────────────────────────────────┐
│ Wire Format │
├─────────────────────────────────────────────────────────────┤
│ Content-Type: application/proto │
│ │
│ Request: TripleRequestWrapper (protobuf) │
│ ├── serializeType: "hessian2" │
│ ├── args: [hessian2(arg1), hessian2(arg2), ...] │
│ └── argTypes: ["java.lang.String", ...] │
│ │
│ Response: TripleResponseWrapper (protobuf) │
│ ├── serializeType: "hessian2" │
│ ├── data: hessian2(result) │
│ └── type: "org.apache.dubbo.samples.User" │
└─────────────────────────────────────────────────────────────┘
```
This is a **two-layer serialization**: protobuf wrapper on the outside, hessian2 data on the inside.
### Implementation Details
#### 1. New `WrapperCodec` Interface (`codec.go`)
```go
type WrapperCodec interface {
Codec
WireCodecName() string // Returns "proto" for Content-Type
}
```
This interface allows a codec to use different names for:
- Internal registration: `Name()` returns "hessian2"
- Wire format: `WireCodecName()` returns "proto"
#### 2. New `protoWrapperCodec` (`codec.go`)
Client-side codec that:
- Wraps request arguments in `TripleRequestWrapper`
- Unwraps response from `TripleResponseWrapper`
- Uses hessian2 for inner data serialization
```go
type protoWrapperCodec struct {
innerCodec Codec // hessian2Codec
}
func (c *protoWrapperCodec) Marshal(message any) ([]byte, error) {
// 1. Serialize each arg with hessian2
// 2. Get Java type for each arg
// 3. Wrap in TripleRequestWrapper
// 4. Marshal with protobuf
}
```
#### 3. Enhanced `protoBinaryCodec` (`codec.go`)
Server-side enhancement to handle incoming wrapped requests:
- Detects non-proto.Message types
- Unwraps from `TripleRequestWrapper`/`TripleResponseWrapper`
- Deserializes with hessian2
#### 4. Generic Filter Enhancement (`filter/generic/filter.go`)
Added `parameterRawValues` support for Triple protocol:
```go
// For Triple protocol, we need [methodName, types, args, reply]
// Triple invoker slices as: request = inRaw[0:len-1], reply = inRaw[len-1]
parameterRawValues := []any{mtdName, types, args, reply}
```
#### 5. Server-side Generic Call Handler (`server/server.go`)
Auto-registers `$invoke` method for services:
```go
func registerGenericInvokeMethod(srv any, interfaceName string) map[string]MethodInfo {
return map[string]MethodInfo{
constant.Generic: { // "$invoke"
Name: constant.Generic,
StreamType: StreamTypeUnary,
MethodFunc: genericInvokeHandler(srv),
ReqInitFunc: func() any { return []any{new(string), new([]string), new([]any)} },
},
}
}
```
### Call Flow
```
Go Client Java Server
│ │
│ conn.CallUnary(ctx, args, &result, "GetUser") │
│ │ │
│ ▼ │
│ Generic Filter: $invoke("GetUser", types, args) │
│ │ │
│ ▼ │
│ protoWrapperCodec.Marshal() │
│ ├── hessian2 serialize args │
│ └── protobuf wrap in TripleRequestWrapper │
│ │ │
│ ▼ │
│ ════════════════════════════════════════════════► │
│ HTTP/2 + Content-Type: application/proto │
│ │
│ ◄════════════════════════════════════════════════ │
│ TripleResponseWrapper (protobuf) │
│ │ │
│ ▼ │
│ protoWrapperCodec.Unmarshal() │
│ ├── protobuf unwrap TripleResponseWrapper │
│ └── hessian2 deserialize → User object │
│ │
```
### Files Changed
| File | Changes |
|------|---------|
| `protocol/triple/triple_protocol/codec.go` | Add `WrapperCodec` interface, `protoWrapperCodec`, enhance `protoBinaryCodec` |
| `protocol/triple/triple_protocol/codec_wrapper_test.go` | Comprehensive unit tests (631 lines) |
| `filter/generic/filter.go` | Add `parameterRawValues` for Triple protocol |
| `client/options.go` | Add `WithGeneric()` option |
| `server/server.go` | Add generic call handler registration |
| `protocol/triple/client.go` | Wire up wrapper codec for generic mode |
| `protocol/triple/server.go` | Handle generic call on server side |
| `protocol/triple/triple.go` | Minor adjustments for generic support |
| `common/constant/key.go` | Add generic-related constants |
| `protocol/triple/triple_protocol/protocol_grpc.go` | Use `getWireCodecName()` for Content-Type |
| `protocol/triple/triple_protocol/protocol_triple.go` | Use `getWireCodecName()` for Content-Type |
### Testing
**Unit Tests**: 631 lines of comprehensive tests covering:
- `protoWrapperCodec` marshal/unmarshal
- `protoBinaryCodec` wrapper handling
- Various data types (string, int, POJO, arrays, maps)
- Edge cases and error scenarios
**Integration Tests**:
| Scenario | Result |
|----------|--------|
| Go client → Java server (Dubbo protocol) | PASS |
| Go client → Java server (Triple protocol) | PASS |
| Java client → Go server (Triple protocol) | PASS |
| Go client → Go server (Triple protocol) | PASS |
### Usage Example
```go
// Create client with Triple protocol
cli, _ := ins.NewClient(
client.WithClientProtocolTriple(),
client.WithClientSerialization(constant.Hessian2Serialization),
)
// Dial with generic mode enabled
conn, _ := cli.Dial(
"org.apache.dubbo.samples.UserProvider",
client.WithURL("tri://127.0.0.1:50052"),
client.WithGeneric(), // Enable generic call
)
// Make generic call without pre-generated stubs
var result interface{}
err := conn.CallUnary(ctx, []interface{}{"user123"}, &result, "GetUser")
```
### Compatibility
- **Backward Compatible**: Existing IDL-based Triple calls are not affected
- **Cross-Language**: Fully compatible with Java Dubbo 3.x Triple protocol
- **Dubbo Protocol**: Existing Dubbo protocol generic call still works as before
---
Signed-off-by: TsukiKage <ch...@163.com>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on code in PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#discussion_r2688745078
##########
protocol/triple/triple.go:
##########
@@ -141,6 +149,18 @@ func (tp *TripleProtocol) Destroy() {
tp.BaseProtocol.Destroy()
}
+// isGenericCall checks if the generic parameter indicates a generic call
+func isGenericCall(generic string) bool {
+ if generic == "" {
+ return false
+ }
+ lowerGeneric := strings.ToLower(generic)
+ return lowerGeneric == constant.GenericSerializationDefault ||
+ lowerGeneric == constant.GenericSerializationGson ||
+ lowerGeneric == constant.GenericSerializationProtobuf ||
+ lowerGeneric == constant.GenericSerializationProtobufJson
+}
Review Comment:
use `strings.EqualFold` instead, no need to `toLower` and `==`
##########
server/server.go:
##########
@@ -176,6 +179,61 @@ func (s *Server) genSvcOpts(handler any, info *common.ServiceInfo, opts ...Servi
return newSvcOpts, nil
}
+// isNillable checks if a reflect.Value's kind supports nil checking.
+func isNillable(v reflect.Value) bool {
+ switch v.Kind() {
+ case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Pointer, reflect.Slice:
+ return true
+ default:
+ return false
+ }
+}
+
+// isReflectNil safely checks if a reflect.Value is nil.
+func isReflectNil(v reflect.Value) bool {
+ return isNillable(v) && v.IsNil()
+}
+
+// CallMethodByReflection invokes the given method via reflection and processes its return values.
+// This is a shared helper function used by both server/server.go and protocol/triple/server.go.
+func CallMethodByReflection(ctx context.Context, method reflect.Method, handler any, args []any) (any, error) {
+ in := []reflect.Value{reflect.ValueOf(handler)}
+ in = append(in, reflect.ValueOf(ctx))
+ for _, arg := range args {
+ in = append(in, reflect.ValueOf(arg))
+ }
+ returnValues := method.Func.Call(in)
+
+ // Process return values
+ if len(returnValues) == 1 {
+ if isReflectNil(returnValues[0]) {
+ return nil, nil
+ }
+ if err, ok := returnValues[0].Interface().(error); ok {
+ return nil, err
+ }
+ return nil, nil
+ }
+ var result any
+ var err error
+ if !isReflectNil(returnValues[0]) {
+ result = returnValues[0].Interface()
+ }
+ if len(returnValues) > 1 && !isReflectNil(returnValues[1]) {
+ if e, ok := returnValues[1].Interface().(error); ok {
+ err = e
+ }
+ }
+ return result, err
+}
+
+// createReflectionMethodFunc creates a MethodFunc that calls the given method via reflection.
+func createReflectionMethodFunc(method reflect.Method) func(ctx context.Context, args []any, handler any) (any, error) {
+ return func(ctx context.Context, args []any, handler any) (any, error) {
+ return CallMethodByReflection(ctx, method, handler, args)
+ }
+}
+
// Add a method with a name of a different first-letter case
// to achieve interoperability with java
// TODO: The method name case sensitivity in Dubbo-java should be addressed.
Review Comment:
I'm wondering is this todo solved?
##########
protocol/triple/server.go:
##########
@@ -503,51 +503,101 @@ func createServiceInfoWithReflection(svc common.RPCService) *common.ServiceInfo
if methodType.Name == "Reference" {
continue
}
- paramsNum := methodType.Type.NumIn()
- // the first param is receiver itself, the second param is ctx
- // just ignore them
- if paramsNum < 2 {
- logger.Fatalf("TRIPLE does not support %s method that does not have any parameter", methodType.Name)
- continue
- }
- paramsTypes := make([]reflect.Type, paramsNum-2)
- for j := 2; j < paramsNum; j++ {
- paramsTypes[j-2] = methodType.Type.In(j)
- }
- methodInfo := common.MethodInfo{
- Name: methodType.Name,
- // only support Unary invocation now
- Type: constant.CallUnary,
- ReqInitFunc: func() any {
- params := make([]any, len(paramsTypes))
- for k, paramType := range paramsTypes {
- params[k] = reflect.New(paramType).Interface()
- }
- return params
- },
+ methodInfo := buildMethodInfoWithReflection(methodType)
+ if methodInfo != nil {
+ methodInfos = append(methodInfos, *methodInfo)
}
- methodInfos = append(methodInfos, methodInfo)
}
- // only support no-idl mod call unary
- genericMethodInfo := common.MethodInfo{
- Name: "$invoke",
- Type: constant.CallUnary,
+ // Add $invoke method for generic call support
+ methodInfos = append(methodInfos, buildGenericMethodInfo())
Review Comment:
this `methodInfos` is appended inside the loop in line 508 and appended outside the loop in line 513, is it correct?
##########
protocol/triple/triple_protocol/codec.go:
##########
@@ -227,29 +322,51 @@ func (c *protoWrapperCodec) Marshal(message any) ([]byte, error) {
return proto.Marshal(wrapperReq)
}
+// Unmarshal handles both TripleResponseWrapper (for responses) and TripleRequestWrapper (for requests).
+// It determines the format by checking if message is a slice (request) or not (response).
func (c *protoWrapperCodec) Unmarshal(binary []byte, message any) error {
- var params []any
- var ok bool
- params, ok = message.([]any)
- if !ok {
- params = []any{message}
- }
+ // Check if message is a slice - if so, it's a request with multiple args
+ params, isSlice := message.([]any)
+ if isSlice {
Review Comment:
ditto
##########
server/server.go:
##########
@@ -176,6 +179,61 @@ func (s *Server) genSvcOpts(handler any, info *common.ServiceInfo, opts ...Servi
return newSvcOpts, nil
}
+// isNillable checks if a reflect.Value's kind supports nil checking.
+func isNillable(v reflect.Value) bool {
+ switch v.Kind() {
+ case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Pointer, reflect.Slice:
+ return true
+ default:
+ return false
+ }
+}
+
+// isReflectNil safely checks if a reflect.Value is nil.
+func isReflectNil(v reflect.Value) bool {
+ return isNillable(v) && v.IsNil()
+}
Review Comment:
is this method redefined in the protocol/triple/server.go:594?
##########
protocol/triple/triple_protocol/codec.go:
##########
@@ -114,11 +118,62 @@ func (c *protoBinaryCodec) Marshal(message any) ([]byte, error) {
func (c *protoBinaryCodec) Unmarshal(data []byte, message any) error {
protoMessage, ok := message.(proto.Message)
if !ok {
- return errNotProto(message)
+ // Non-proto types indicate a generic call - try to unwrap from wrapper format.
+ // This is used by the server when receiving Java/Go generic calls.
+ return c.unmarshalWrappedMessage(data, message)
}
return proto.Unmarshal(data, protoMessage)
}
+// unmarshalWrappedMessage handles both TripleResponseWrapper and TripleRequestWrapper formats.
+// It determines the format by checking if message is a slice (request) or not (response).
+func (c *protoBinaryCodec) unmarshalWrappedMessage(data []byte, message any) error {
+ hessianCodec := &hessian2Codec{}
+
+ // Check if message is a slice - if so, it's a request with multiple args
+ params, isSlice := message.([]any)
+ if isSlice {
Review Comment:
```suggestion
if params, isSlice := message.([]any); isSlice {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3752864867
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on code in PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#discussion_r2693354222
##########
server/server.go:
##########
@@ -176,6 +179,61 @@ func (s *Server) genSvcOpts(handler any, info *common.ServiceInfo, opts ...Servi
return newSvcOpts, nil
}
+// isNillable checks if a reflect.Value's kind supports nil checking.
+func isNillable(v reflect.Value) bool {
+ switch v.Kind() {
+ case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Pointer, reflect.Slice:
+ return true
+ default:
+ return false
+ }
+}
+
+// isReflectNil safely checks if a reflect.Value is nil.
+func isReflectNil(v reflect.Value) bool {
+ return isNillable(v) && v.IsNil()
+}
+
+// CallMethodByReflection invokes the given method via reflection and processes its return values.
+// This is a shared helper function used by both server/server.go and protocol/triple/server.go.
+func CallMethodByReflection(ctx context.Context, method reflect.Method, handler any, args []any) (any, error) {
+ in := []reflect.Value{reflect.ValueOf(handler)}
+ in = append(in, reflect.ValueOf(ctx))
+ for _, arg := range args {
+ in = append(in, reflect.ValueOf(arg))
+ }
+ returnValues := method.Func.Call(in)
+
+ // Process return values
+ if len(returnValues) == 1 {
+ if isReflectNil(returnValues[0]) {
+ return nil, nil
+ }
+ if err, ok := returnValues[0].Interface().(error); ok {
+ return nil, err
+ }
+ return nil, nil
+ }
+ var result any
+ var err error
+ if !isReflectNil(returnValues[0]) {
+ result = returnValues[0].Interface()
+ }
+ if len(returnValues) > 1 && !isReflectNil(returnValues[1]) {
+ if e, ok := returnValues[1].Interface().(error); ok {
+ err = e
+ }
+ }
+ return result, err
+}
+
+// createReflectionMethodFunc creates a MethodFunc that calls the given method via reflection.
+func createReflectionMethodFunc(method reflect.Method) func(ctx context.Context, args []any, handler any) (any, error) {
+ return func(ctx context.Context, args []any, handler any) (any, error) {
+ return CallMethodByReflection(ctx, method, handler, args)
+ }
+}
+
// Add a method with a name of a different first-letter case
// to achieve interoperability with java
// TODO: The method name case sensitivity in Dubbo-java should be addressed.
Review Comment:
建个issue,记下这个 todo 吧
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3713240919
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.2% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "Tsukikage7 (via GitHub)" <gi...@apache.org>.
Tsukikage7 commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3742852256
@marsevilspirit @Alanxtl Need Review pls.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "Tsukikage7 (via GitHub)" <gi...@apache.org>.
Tsukikage7 commented on code in PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#discussion_r2692934139
##########
server/server.go:
##########
@@ -176,6 +179,61 @@ func (s *Server) genSvcOpts(handler any, info *common.ServiceInfo, opts ...Servi
return newSvcOpts, nil
}
+// isNillable checks if a reflect.Value's kind supports nil checking.
+func isNillable(v reflect.Value) bool {
+ switch v.Kind() {
+ case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Pointer, reflect.Slice:
+ return true
+ default:
+ return false
+ }
+}
+
+// isReflectNil safely checks if a reflect.Value is nil.
+func isReflectNil(v reflect.Value) bool {
+ return isNillable(v) && v.IsNil()
+}
+
+// CallMethodByReflection invokes the given method via reflection and processes its return values.
+// This is a shared helper function used by both server/server.go and protocol/triple/server.go.
+func CallMethodByReflection(ctx context.Context, method reflect.Method, handler any, args []any) (any, error) {
+ in := []reflect.Value{reflect.ValueOf(handler)}
+ in = append(in, reflect.ValueOf(ctx))
+ for _, arg := range args {
+ in = append(in, reflect.ValueOf(arg))
+ }
+ returnValues := method.Func.Call(in)
+
+ // Process return values
+ if len(returnValues) == 1 {
+ if isReflectNil(returnValues[0]) {
+ return nil, nil
+ }
+ if err, ok := returnValues[0].Interface().(error); ok {
+ return nil, err
+ }
+ return nil, nil
+ }
+ var result any
+ var err error
+ if !isReflectNil(returnValues[0]) {
+ result = returnValues[0].Interface()
+ }
+ if len(returnValues) > 1 && !isReflectNil(returnValues[1]) {
+ if e, ok := returnValues[1].Interface().(error); ok {
+ err = e
+ }
+ }
+ return result, err
+}
+
+// createReflectionMethodFunc creates a MethodFunc that calls the given method via reflection.
+func createReflectionMethodFunc(method reflect.Method) func(ctx context.Context, args []any, handler any) (any, error) {
+ return func(ctx context.Context, args []any, handler any) (any, error) {
+ return CallMethodByReflection(ctx, method, handler, args)
+ }
+}
+
// Add a method with a name of a different first-letter case
// to achieve interoperability with java
// TODO: The method name case sensitivity in Dubbo-java should be addressed.
Review Comment:
Partially. The enhanceServiceInfo function now registers both GetUser and getUser style methods, so Go and Java can find each other. But the real fix should be on dubbo-java side to handle case properly. Kept the TODO as a reminder - maybe we can push for a fix upstream later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3713274948
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3752837210
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3752848970
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3712989614
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [58 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [3.8% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3712927341
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [54 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [8.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "Tsukikage7 (via GitHub)" <gi...@apache.org>.
Tsukikage7 commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3713187474
> **📌 Related Sample PR**
>
> apache/dubbo-go-samples#1016 demonstrates the usage of `NewGenericService` API added in this PR.
>
> The sample PR's CI will pass after this PR is merged to main.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "Tsukikage7 (via GitHub)" <gi...@apache.org>.
Tsukikage7 commented on code in PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#discussion_r2692933818
##########
server/server.go:
##########
@@ -176,6 +179,61 @@ func (s *Server) genSvcOpts(handler any, info *common.ServiceInfo, opts ...Servi
return newSvcOpts, nil
}
+// isNillable checks if a reflect.Value's kind supports nil checking.
+func isNillable(v reflect.Value) bool {
+ switch v.Kind() {
+ case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Pointer, reflect.Slice:
+ return true
+ default:
+ return false
+ }
+}
+
+// isReflectNil safely checks if a reflect.Value is nil.
+func isReflectNil(v reflect.Value) bool {
+ return isNillable(v) && v.IsNil()
+}
Review Comment:
Good catch. They do look similar but live in different packages:
server/server.go has CallMethodByReflection (exported, shared)
protocol/triple/server.go has isReflectValueNil (local helper)
Thought about extracting a common util, but protocol/triple importing server package might cause circular deps. It's just a few lines so I think we're fine for now. Happy to refactor if you think it's worth it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "Tsukikage7 (via GitHub)" <gi...@apache.org>.
Tsukikage7 commented on code in PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#discussion_r2693330585
##########
protocol/triple/server.go:
##########
@@ -503,51 +503,101 @@ func createServiceInfoWithReflection(svc common.RPCService) *common.ServiceInfo
if methodType.Name == "Reference" {
continue
}
- paramsNum := methodType.Type.NumIn()
- // the first param is receiver itself, the second param is ctx
- // just ignore them
- if paramsNum < 2 {
- logger.Fatalf("TRIPLE does not support %s method that does not have any parameter", methodType.Name)
- continue
- }
- paramsTypes := make([]reflect.Type, paramsNum-2)
- for j := 2; j < paramsNum; j++ {
- paramsTypes[j-2] = methodType.Type.In(j)
- }
- methodInfo := common.MethodInfo{
- Name: methodType.Name,
- // only support Unary invocation now
- Type: constant.CallUnary,
- ReqInitFunc: func() any {
- params := make([]any, len(paramsTypes))
- for k, paramType := range paramsTypes {
- params[k] = reflect.New(paramType).Interface()
- }
- return params
- },
+ methodInfo := buildMethodInfoWithReflection(methodType)
+ if methodInfo != nil {
+ methodInfos = append(methodInfos, *methodInfo)
}
- methodInfos = append(methodInfos, methodInfo)
}
- // only support no-idl mod call unary
- genericMethodInfo := common.MethodInfo{
- Name: "$invoke",
- Type: constant.CallUnary,
+ // Add $invoke method for generic call support
+ methodInfos = append(methodInfos, buildGenericMethodInfo())
+
+ info.Methods = methodInfos
+ return &info
+}
+
+// buildMethodInfoWithReflection creates MethodInfo for a single method using reflection.
+func buildMethodInfoWithReflection(methodType reflect.Method) *common.MethodInfo {
+ paramsNum := methodType.Type.NumIn()
+ // the first param is receiver itself, the second param is ctx
+ if paramsNum < 2 {
+ logger.Fatalf("TRIPLE does not support %s method that does not have any parameter", methodType.Name)
+ return nil
+ }
+
+ // Extract parameter types (skip receiver and context)
+ paramsTypes := make([]reflect.Type, paramsNum-2)
+ for j := 2; j < paramsNum; j++ {
+ paramsTypes[j-2] = methodType.Type.In(j)
+ }
+
+ // Capture method for closure
+ method := methodType
+ return &common.MethodInfo{
+ Name: methodType.Name,
+ Type: constant.CallUnary, // only support Unary invocation now
ReqInitFunc: func() any {
- params := make([]any, 3)
- // params must be pointer
- params[0] = func(s string) *string { return &s }("methodName") // methodName *string
- params[1] = &[]string{} // argv type *[]string
- params[2] = &[]hessian.Object{} // argv *[]hessian.Object
+ params := make([]any, len(paramsTypes))
+ for k, paramType := range paramsTypes {
+ params[k] = reflect.New(paramType).Interface()
+ }
return params
},
+ MethodFunc: func(ctx context.Context, args []any, handler any) (any, error) {
+ in := []reflect.Value{reflect.ValueOf(handler)}
+ in = append(in, reflect.ValueOf(ctx))
+ for _, arg := range args {
+ in = append(in, reflect.ValueOf(arg))
+ }
+ returnValues := method.Func.Call(in)
+ if len(returnValues) == 1 {
+ if isReflectValueNil(returnValues[0]) {
+ return nil, nil
+ }
+ if err, ok := returnValues[0].Interface().(error); ok {
+ return nil, err
+ }
+ return nil, nil
+ }
+ var result any
+ var err error
+ if !isReflectValueNil(returnValues[0]) {
+ result = returnValues[0].Interface()
+ }
+ if len(returnValues) > 1 && !isReflectValueNil(returnValues[1]) {
+ if e, ok := returnValues[1].Interface().(error); ok {
+ err = e
+ }
+ }
+ return result, err
+ },
}
+}
- methodInfos = append(methodInfos, genericMethodInfo)
-
- info.Methods = methodInfos
+// buildGenericMethodInfo creates MethodInfo for $invoke generic call method.
+func buildGenericMethodInfo() common.MethodInfo {
+ return common.MethodInfo{
+ Name: constant.Generic,
+ Type: constant.CallUnary,
+ ReqInitFunc: func() any {
+ return []any{
+ func(s string) *string { return &s }(""), // methodName *string
+ &[]string{}, // types *[]string
+ &[]hessian.Object{}, // args *[]hessian.Object
+ }
+ },
+ }
+}
- return &info
+// isReflectValueNil safely checks if a reflect.Value is nil.
+// It first checks if the value's kind supports nil checking to avoid panic.
+func isReflectValueNil(v reflect.Value) bool {
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3712953079
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [54 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [8.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3752852821
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "Tsukikage7 (via GitHub)" <gi...@apache.org>.
Tsukikage7 commented on code in PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#discussion_r2692933309
##########
protocol/triple/server.go:
##########
@@ -503,51 +503,101 @@ func createServiceInfoWithReflection(svc common.RPCService) *common.ServiceInfo
if methodType.Name == "Reference" {
continue
}
- paramsNum := methodType.Type.NumIn()
- // the first param is receiver itself, the second param is ctx
- // just ignore them
- if paramsNum < 2 {
- logger.Fatalf("TRIPLE does not support %s method that does not have any parameter", methodType.Name)
- continue
- }
- paramsTypes := make([]reflect.Type, paramsNum-2)
- for j := 2; j < paramsNum; j++ {
- paramsTypes[j-2] = methodType.Type.In(j)
- }
- methodInfo := common.MethodInfo{
- Name: methodType.Name,
- // only support Unary invocation now
- Type: constant.CallUnary,
- ReqInitFunc: func() any {
- params := make([]any, len(paramsTypes))
- for k, paramType := range paramsTypes {
- params[k] = reflect.New(paramType).Interface()
- }
- return params
- },
+ methodInfo := buildMethodInfoWithReflection(methodType)
+ if methodInfo != nil {
+ methodInfos = append(methodInfos, *methodInfo)
}
- methodInfos = append(methodInfos, methodInfo)
}
- // only support no-idl mod call unary
- genericMethodInfo := common.MethodInfo{
- Name: "$invoke",
- Type: constant.CallUnary,
+ // Add $invoke method for generic call support
+ methodInfos = append(methodInfos, buildGenericMethodInfo())
Review Comment:
Yeah, that's on purpose. Inside the loop we're adding all the regular service methods, then after the loop we add $invoke once for generic call support. Makes sure we don't accidentally register it multiple times.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3713206552
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [58 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [3.8% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3713248037
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.2% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3752838971
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3753141072
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [65 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [7.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3753125333
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3753110854
当前代码我留了一个 comment,请改进。另外,请给其中一些函数添加 unit test。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on code in PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#discussion_r2693152788
##########
protocol/triple/server.go:
##########
@@ -503,51 +503,101 @@ func createServiceInfoWithReflection(svc common.RPCService) *common.ServiceInfo
if methodType.Name == "Reference" {
continue
}
- paramsNum := methodType.Type.NumIn()
- // the first param is receiver itself, the second param is ctx
- // just ignore them
- if paramsNum < 2 {
- logger.Fatalf("TRIPLE does not support %s method that does not have any parameter", methodType.Name)
- continue
- }
- paramsTypes := make([]reflect.Type, paramsNum-2)
- for j := 2; j < paramsNum; j++ {
- paramsTypes[j-2] = methodType.Type.In(j)
- }
- methodInfo := common.MethodInfo{
- Name: methodType.Name,
- // only support Unary invocation now
- Type: constant.CallUnary,
- ReqInitFunc: func() any {
- params := make([]any, len(paramsTypes))
- for k, paramType := range paramsTypes {
- params[k] = reflect.New(paramType).Interface()
- }
- return params
- },
+ methodInfo := buildMethodInfoWithReflection(methodType)
+ if methodInfo != nil {
+ methodInfos = append(methodInfos, *methodInfo)
}
- methodInfos = append(methodInfos, methodInfo)
}
- // only support no-idl mod call unary
- genericMethodInfo := common.MethodInfo{
- Name: "$invoke",
- Type: constant.CallUnary,
+ // Add $invoke method for generic call support
+ methodInfos = append(methodInfos, buildGenericMethodInfo())
+
+ info.Methods = methodInfos
+ return &info
+}
+
+// buildMethodInfoWithReflection creates MethodInfo for a single method using reflection.
+func buildMethodInfoWithReflection(methodType reflect.Method) *common.MethodInfo {
+ paramsNum := methodType.Type.NumIn()
+ // the first param is receiver itself, the second param is ctx
+ if paramsNum < 2 {
+ logger.Fatalf("TRIPLE does not support %s method that does not have any parameter", methodType.Name)
+ return nil
+ }
+
+ // Extract parameter types (skip receiver and context)
+ paramsTypes := make([]reflect.Type, paramsNum-2)
+ for j := 2; j < paramsNum; j++ {
+ paramsTypes[j-2] = methodType.Type.In(j)
+ }
+
+ // Capture method for closure
+ method := methodType
+ return &common.MethodInfo{
+ Name: methodType.Name,
+ Type: constant.CallUnary, // only support Unary invocation now
ReqInitFunc: func() any {
- params := make([]any, 3)
- // params must be pointer
- params[0] = func(s string) *string { return &s }("methodName") // methodName *string
- params[1] = &[]string{} // argv type *[]string
- params[2] = &[]hessian.Object{} // argv *[]hessian.Object
+ params := make([]any, len(paramsTypes))
+ for k, paramType := range paramsTypes {
+ params[k] = reflect.New(paramType).Interface()
+ }
return params
},
+ MethodFunc: func(ctx context.Context, args []any, handler any) (any, error) {
+ in := []reflect.Value{reflect.ValueOf(handler)}
+ in = append(in, reflect.ValueOf(ctx))
+ for _, arg := range args {
+ in = append(in, reflect.ValueOf(arg))
+ }
+ returnValues := method.Func.Call(in)
+ if len(returnValues) == 1 {
+ if isReflectValueNil(returnValues[0]) {
+ return nil, nil
+ }
+ if err, ok := returnValues[0].Interface().(error); ok {
+ return nil, err
+ }
+ return nil, nil
+ }
+ var result any
+ var err error
+ if !isReflectValueNil(returnValues[0]) {
+ result = returnValues[0].Interface()
+ }
+ if len(returnValues) > 1 && !isReflectValueNil(returnValues[1]) {
+ if e, ok := returnValues[1].Interface().(error); ok {
+ err = e
+ }
+ }
+ return result, err
+ },
}
+}
- methodInfos = append(methodInfos, genericMethodInfo)
-
- info.Methods = methodInfos
+// buildGenericMethodInfo creates MethodInfo for $invoke generic call method.
+func buildGenericMethodInfo() common.MethodInfo {
+ return common.MethodInfo{
+ Name: constant.Generic,
+ Type: constant.CallUnary,
+ ReqInitFunc: func() any {
+ return []any{
+ func(s string) *string { return &s }(""), // methodName *string
+ &[]string{}, // types *[]string
+ &[]hessian.Object{}, // args *[]hessian.Object
+ }
+ },
+ }
+}
- return &info
+// isReflectValueNil safely checks if a reflect.Value is nil.
+// It first checks if the value's kind supports nil checking to avoid panic.
+func isReflectValueNil(v reflect.Value) bool {
Review Comment:
在 case 1 中增加对 UnsafePointer 的检查:
func isReflectValueNil(v reflect.Value) bool {
switch v.Kind() {
case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map,
reflect.Pointer, reflect.Slice, reflect.UnsafePointer:
return v.IsNil()
default:
return false
}
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3712996234
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [58 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [3.7% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3713288002
## [Codecov](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `41.40969%` with `133 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 48.00%. Comparing base ([`489ee6a`](https://app.codecov.io/gh/apache/dubbo-go/commit/489ee6aed49b9a08cd0fb63232a4eaec5fce6e1a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b50ad31`](https://app.codecov.io/gh/apache/dubbo-go/commit/b50ad3193f809e0adf17528958495dec0abd1352?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [server/server.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&filepath=server%2Fserver.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NlcnZlci5nbw==) | 6.12% | [41 Missing and 5 partials :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [protocol/triple/server.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&filepath=protocol%2Ftriple%2Fserver.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJvdG9jb2wvdHJpcGxlL3NlcnZlci5nbw==) | 46.29% | [28 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [protocol/triple/triple\_protocol/codec.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&filepath=protocol%2Ftriple%2Ftriple_protocol%2Fcodec.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJvdG9jb2wvdHJpcGxlL3RyaXBsZV9wcm90b2NvbC9jb2RlYy5nbw==) | 58.92% | [18 Missing and 5 partials :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [client/client.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&filepath=client%2Fclient.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2xpZW50L2NsaWVudC5nbw==) | 0.00% | [11 Missing :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [protocol/triple/triple.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&filepath=protocol%2Ftriple%2Ftriple.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJvdG9jb2wvdHJpcGxlL3RyaXBsZS5nbw==) | 27.27% | [8 Missing :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [protocol/triple/client.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&filepath=protocol%2Ftriple%2Fclient.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJvdG9jb2wvdHJpcGxlL2NsaWVudC5nbw==) | 41.66% | [5 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [filter/generic/filter.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&filepath=filter%2Fgeneric%2Ffilter.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZmlsdGVyL2dlbmVyaWMvZmlsdGVyLmdv) | 79.31% | [2 Missing and 4 partials :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [client/options.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&filepath=client%2Foptions.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2xpZW50L29wdGlvbnMuZ28=) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #3154 +/- ##
==========================================
+ Coverage 47.80% 48.00% +0.19%
==========================================
Files 460 460
Lines 33011 33187 +176
==========================================
+ Hits 15782 15930 +148
- Misses 15963 15967 +4
- Partials 1266 1290 +24
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/dubbo-go/pull/3154?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3752848521
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3752853205
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154#issuecomment-3752841845
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154) **Quality Gate passed**
Issues
 [59 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3154&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3154&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_coverage&view=list)
 [6.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3154&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3154)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(triple): support generic call for Triple protocol [dubbo-go]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks merged PR #3154:
URL: https://github.com/apache/dubbo-go/pull/3154
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org