This is an automated email from the ASF dual-hosted git repository.

Alanxtl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/develop by this push:
     new 755f48efc feature(triple): support bean generic mode and retain 
protobuf compatibility  (#3507)
755f48efc is described below

commit 755f48efc4194cc625180de676d2453fe7ea8e34
Author: 翎 <[email protected]>
AuthorDate: Tue Aug 11 18:53:18 2026 +0800

    feature(triple): support bean generic mode and retain protobuf 
compatibility  (#3507)
    
    * test(triple): cover supported generic modes
    
    * fix(triple): retain protobuf generic compatibility
    
    * fix(ci): use local dubbo-go for integration tests
    
    * fix(triple): clarify protobuf legacy generic routing
    
    * chore(ci): restore integration test comment
---
 protocol/triple/triple.go      | 4 +++-
 protocol/triple/triple_test.go | 6 +++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/protocol/triple/triple.go b/protocol/triple/triple.go
index 943497a30..fffce61c0 100644
--- a/protocol/triple/triple.go
+++ b/protocol/triple/triple.go
@@ -150,7 +150,7 @@ func (tp *TripleProtocol) Refer(url *common.URL) 
base.Invoker {
        // Use NewTripleInvoker for:
        // 1. New protoc-gen-go-triple stub code (has ClientInfoKey)
        // 2. Non-IDL mode (IDLMode == NONIDL)
-       // 3. Generic call (generic=true/gson/protobuf/protobuf-json/bean)
+       // 3. Generic call (generic=true/gson/protobuf-json/bean, or the legacy 
protobuf routing marker)
        if ok || IDLMode == constant.NONIDL || isGenericCall {
                // new triple invoker supporting $invoke for generic calls
                invoker, err = NewTripleInvoker(url)
@@ -234,6 +234,8 @@ func (tp *TripleProtocol) HostHTTPHandler(url *common.URL, 
handler http.Handler)
 // It delegates to internal.IsGenericMode so the accepted mode set stays in 
sync
 // with reference-creation validation (internal.ValidateGenericType), which is 
why
 // "bean" is recognized here too and routes to the $invoke-capable 
NewTripleInvoker.
+// "protobuf" is kept only as a legacy Triple routing marker; do not normalize 
it
+// to protobuf-json because that changes provider-side generic argument 
semantics.
 func isGenericCall(generic string) bool {
        return internal.IsGenericMode(generic)
 }
diff --git a/protocol/triple/triple_test.go b/protocol/triple/triple_test.go
index 1e91e1089..78832b389 100644
--- a/protocol/triple/triple_test.go
+++ b/protocol/triple/triple_test.go
@@ -303,9 +303,9 @@ func Test_isGenericCall(t *testing.T) {
                {"gson", "gson", true},
                {"GSON", "GSON", true},
                {"Gson", "Gson", true},
-               {"protobuf", "protobuf", true},
-               {"PROTOBUF", "PROTOBUF", true},
-               {"Protobuf", "Protobuf", true},
+               {"protobuf legacy alias", "protobuf", true},
+               {"PROTOBUF legacy alias", "PROTOBUF", true},
+               {"Protobuf legacy alias", "Protobuf", true},
                {"protobuf-json", "protobuf-json", true},
                {"PROTOBUF-JSON", "PROTOBUF-JSON", true},
                {"Protobuf-Json", "Protobuf-Json", true},

Reply via email to